22 Mar 2012 11:56 AM #14
So in 4.1 RC1, a method Model.getData(boolean) was added. Passing a value of true will correctly call the getAssociatedData and return a complete object graph.
However, upon further inspection of the Ext.data.writer.Writer.getRecordData() function, I see they are not making use of this but are instead only iterating over the non-association fields of the model object. I see no way of indicating to the Writer that it should utilize Model.getData(). I think as a default that this is the correct behavior since more often then not you do not want to return a complete object graph but instead persist the associated models independently. But we still need a means of passing an option such that we can indicate we DO want it to do this.
I think this is an absolute necessity and I'm kind of shocked ExtJS has gone this far without something being done about this. It's things like this that make me desperately miss Backbone.js.