pangratz / ember-data-meta-links-improvements Goto Github PK
View Code? Open in Web Editor NEWPOC for https://github.com/emberjs/rfcs/pull/160
License: MIT License
POC for https://github.com/emberjs/rfcs/pull/160
License: MIT License
Hi, I've been trying to fix this myself but haven't been able to figure it out so far.
When I get a single record with findRecord
that has a hasMany
relationship, I can request the relationship's links. However, if I use findAll
, the relationship's links do not get populated.
When I do delete with response status code of 204 and no response body I get this:
TypeError: Cannot read property 'meta' of undefined
at Class.didSaveRecord (store.js:62)
at Class.superWrapper [as didSaveRecord] (ember.debug.js:24805)
at store.js:2191
at Backburner.run (ember.debug.js:294)
at Class._adapterRun (store.js:2058)
at store.js:2182
at tryCatch (ember.debug.js:50954)
at invokeCallback (ember.debug.js:50969)
at publish (ember.debug.js:50937)
at ember.debug.js:40417
Line 62 of store.js tells me that didSaveRecord
was accessed where it uses data
. So I think the problem is this
data.meta
and data._top_level_meta
are defined.I am getting You tried to get the 'testCase' relationship on a 'execution' via record.hasMany('testCase'), but the relationship is of type 'belongsTo'. Use record.belongsTo('testCase') instead
with
...,
relationships: {
"test-case": {
id: 5,
type: "test-case"
}
}
and this seems to be caused by
. If I comment out this line error goes away and things work. It actually does two assumptions:links
(which it doesn't)hasMany
and not belongsTo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.