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
// post
import DS from 'ember-data';
export default DS.Model.extend({
author: DS.belongsTo(),
owner: DS.belongsTo('ownerable', { polymorphic: true, inverse: null })
});
// author
Model.extend({
post: belongsTo()
});
// scenario
let post = this.server.create('post', {
owner: this.server.create('author')
});
author should get set as the post's owner, but ends up getting set as post's author. (The owner relationship has a null inverse, but I believe when author is being saved it looks to see if there's an inverse for model type post, says yes there is, then updates everything.)
The text was updated successfully, but these errors were encountered:
I think there's an orm bug...
author should get set as the post's owner, but ends up getting set as post's author. (The owner relationship has a null inverse, but I believe when author is being saved it looks to see if there's an inverse for model type
post
, says yes there is, then updates everything.)The text was updated successfully, but these errors were encountered: