Threaded View
-
3 Oct 2012 12:29 PM #1
Can't have more than one association instance of the same model
Can't have more than one association instance of the same model
Architect doesn't expose the associatedName config for associations, which causes the cached property to be "{ModelName}BelongsToInstance", creating a conflict when you want to association multiple models of the same type.
For now, I've overcome this by overriding the getInstanceName methods of the associations to use the associationKey, if it's available, i.e.:
Code:Ext.define('Ext.data.association.override.BelongsTo', { override: 'Ext.data.association.BelongsTo', getInstanceName:function(){ var assKey = this.getAssociationKey(); return assKey ? assKey+'BelongsToInstance' : me.callParent(); } });
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote