Permalink
Browse files

Added innerOf property to inner associated models on instantiation

  • Loading branch information...
1 parent 09d2432 commit c64dd5aa41ee5d9955678bb6d4439228b9782cb2 @Munter Munter committed Mar 18, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/platform/src/data/readers/Reader.js
@@ -364,6 +364,12 @@ Ext.data.Reader = Ext.extend(Object, {
});
}
+ // If the association is an inner association, set an innerOf property that links to the parent model.
+ if (association.inner) {
+ store.data.each(function(associatedRecord) {
+ associatedRecord.innerOf = record;
+ });
+ }
} else if (association.type == 'belongsTo') {
record[association.instanceName] = reader.read([associationData]).records[0];
}

0 comments on commit c64dd5a

Please sign in to comment.