Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added innerOf property to inner associated models on instantiation

  • Loading branch information...
commit c64dd5aa41ee5d9955678bb6d4439228b9782cb2 1 parent 09d2432
@Munter Munter authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/platform/src/data/readers/Reader.js
View
6 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];
}
Please sign in to comment.
Something went wrong with that request. Please try again.