23 May 2012, 12:17 PM
Sencha Premium Member
I took the code, and tweaked it to support ST1. It doesn't seem that the implementation supports an 'id' field which is set independently (e.g., such as a server). Is that supported under ST2? If I try to set it up that way on ST1, the server id's do get written to sql properly, but the getInsertRecordFunc and getUpdateRecordFunc overwrite the id in memory to the rowid. So now there is no reference to the server id. But if I re-read the data from sql, it will set the id properly, since applyDataToModel calls 'new Model(data, rowid)', which will set the id to the server id and internalId to rowid.
UPDATE ON MY QUESTION ABOVE: I just came across the following thread post which answers the question - http://www.sencha.com/forum/showthre...l=1#post805349. Basically, the id field is "reserved" to store rowid, and a server record id should use a different name. It would certainly be nice if the proxy could be smart enough to allow developer use of id and use a different mechanism to track rowid.