View Full Version : [CLOSED][3.0rev5213] realize fails if record doesn't contain id as a field

26 Aug 2009, 6:51 AM
after Updateing the Ext Version to the last rev from the SVN, my Store didn't allow me to add a record while using the JsonWriter. The following exception was thrown

"#realize was called with invalid remote-data. Please see the docs for DataReader#realize and review your DataReader configuration."

I Debugged the code and found out that the data Propertie of the realize Function doesn't contain the Id property although the server sent it back to the client if the id is not one of the records fields.

This propertie seems to get lost in the onWrite function while data gets filled via the extractData function.

onWrite : function(action, trans, result, res, rs) {
var data = trans.reader.extractData(result);
this.fireEvent("write", this, action, data, res, rs, trans.request.arg);
trans.request.callback.call(trans.request.scope, data, res, true);

Since extractData will only extract those properties defined in the record the id Propertie gets only extracted if it is defined in the record as a field too. while you have to set the Id propertie in the reader you may not want to add it to the record as a field as well.

I think you should extract the readers idPropertie from the result into the data aswell?

Best Regards

10 Sep 2009, 7:10 PM
I believe this is already fixed in SVN, rev 5221, can you confirm?

18 Oct 2009, 8:33 AM
This thread has been in the INFOREQ status for some time with no new information posted. I'm going to update the status to CLOSED.