Permalink
Browse files

* in trying to merge this to be helpful to someone that needs embedde…

…d associations, it looks like a missed a change to the DS.Model.dataDidChange() method...
  • Loading branch information...
1 parent ac4aff1 commit bc52125e029d510e238534d4935e10a085bf9ead @mspisars committed Nov 4, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 packages/ember-data/lib/system/model/model.js
@@ -150,6 +150,7 @@ DS.Model = Ember.Object.extend(Ember.Evented, {
var associations = get(this.constructor, 'associationsByName'),
hasMany = get(this, 'data').hasMany, store = get(this, 'store'),
idToClientId = store.idToClientId,
+ adapter= store.get('_adapter'),
cachedValue;
this.updateRecordArraysLater();
@@ -165,6 +166,9 @@ DS.Model = Ember.Object.extend(Ember.Evented, {
var clientIds;
clientIds = Ember.EnumerableUtils.map(ids, function(id) {
+ if (association.options.embedded === true && typeof id === "object") {
+ id = adapter.serializer.extractId(association.type, id);
+ }
return store.clientIdForId(association.type, id);
});

0 comments on commit bc52125

Please sign in to comment.