Skip to content

Commit

Permalink
Pass _internalModel into a record when it is created
Browse files Browse the repository at this point in the history
  • Loading branch information
bmac committed Jun 8, 2015
1 parent 7d2f848 commit 6406f1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ember-data/lib/system/model/internal-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ InternalModel.prototype = {
this.record = this.type._create({
id: this.id,
store: this.store,
container: this.container
container: this.container,
_internalModel: this
});
this.record._internalModel = this;
this._triggerDeferredTriggers();
},

Expand Down
1 change: 1 addition & 0 deletions packages/ember-data/lib/system/model/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var retrieveFromCurrentState = Ember.computed('currentState', function(key) {
var Model = Ember.Object.extend(Ember.Evented, {
_recordArrays: undefined,
_relationships: undefined,
_internalModel: null,

store: null,

Expand Down

0 comments on commit 6406f1f

Please sign in to comment.