associations getting set upon store.insert
I have a Contact model with a hasOne association to Address
and code that inserts a newly constructed Contact into a store
when I inspect the variable a after it is created (before the store.insert), the association is not set, i.e. a.address is undefined.
var a = Ext.create('CrmApp.model.Contact');
but if I inspect it after the store.insert call, it is set with data seemingly copied from another model instance from the store (probably the one that was currently selected in the grid?).
I stepped into Store.insert and the address property is undefined until the line me.fireEvent('add', me, records, index);
after that executes, it is set.
As far as I know, I do not have any listeners on that event. Any idea where/why the associations are being set?