You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
store.push({
data: {
id: '1',
type: 'foo',
relationships: {
bars: {
links: {
related: '/api/foo/1/relationships/bars/data/'
}
}
}
}
});
const foo = store.peekRecord('foo', '1');
// In 2.14+ if this line is is active the `remoteType` will be fixed and so be `link`. However if its not active the following call to `store.push` will change the `remoteType` to `ids`. This will also cause the behaviour of `reload()` to change. In 2.13 the remoteType will never be `ids`.
// console.log(foo.hasMany('bars').remoteType());
store.push({
data: {
id: '1',
type: 'bar',
relationships: {
foo: {
data: {
id: '1',
type: 'foo',
}
}
}
}
});
// in 2.13 this will always return `link`. However in 2.14+ this will return `ids` when remoteType() has not been called before the second store.push, otherwise it will be link.
console.log(foo.hasMany('bars').remoteType());
The text was updated successfully, but these errors were encountered:
Assuming we have the following models:
Bar:
Foo:
Now assume the following code:
The text was updated successfully, but these errors were encountered: