Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix initial polymorphic attribute #5366

Merged
merged 1 commit into from
Apr 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion addon/-private/system/relationships/state/has-many.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export default class ManyRelationship extends Relationship {
super(store, internalModel, inverseKey, relationshipMeta);
this.belongsToType = relationshipMeta.type;
this.canonicalState = [];
this.isPolymorphic = relationshipMeta.options.polymorphic;
// The ManyArray for this relationship
this._manyArray = null;
// The previous ManyArray for this relationship. It will be destroyed when
Expand Down
2 changes: 1 addition & 1 deletion addon/-private/system/relationships/state/relationship.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class Relationship {
this.inverseKey = inverseKey;
this.internalModel = internalModel;
this.isAsync = typeof async === 'undefined' ? true : async;
this.isPolymorphic = typeof polymorphic === 'undefined' ? true : polymorphic;
this.isPolymorphic = typeof polymorphic === 'undefined' ? false : polymorphic;
this.relationshipMeta = relationshipMeta;
//This probably breaks for polymorphic relationship in complex scenarios, due to
//multiple possible modelNames
Expand Down