PDA

View Full Version : writeAllFields: false. Returning data from server blanks out fields not updated.



Tim Toady
13 Dec 2010, 9:06 AM
I have a store with a writer. I am not writing all fields so it only sends the updates. After updating the fields in the database I may need to return them back to the client. If I return just the updated fields everything else gets set empty.

Looking at the code, in reader.update it does an Ext.apply(rec.data, data) and "data" has all the fields as empty except the one I returned from the server. Is there an easy way to force that data object to have only what I updated so that it doesn't blank everything else out. Sure I could return the data from the server or send it all with writeAllFields.... but why should I have to???

Edit:
Is there something I am not understanding? Why should I requery the DB or writeAllFields: true only to send back data the client already knows? Only returning success: true updates them, but if any changes are made serverside I have to pull the whole record?

clements
21 Dec 2010, 1:20 PM
I'm having the same problem. The writeAllFields option seems sort of useless. Maybe I'm missing something too?