PDA

View Full Version : Store sync can know which records are correclty wrote into DB and which not?



American horizon
1 Jul 2016, 1:07 AM
Hi
Once some records are added to a store, when the method "sync" is called, the store send to a the servlet all the new records that doens't have the id property setted.
Supposing that server side some record can be correctly inserted into the database, while other not (for example, due to a contraint violation), there is an automated mechanism of the store which knows which records are correctly submitted and witch not, according to server response?
I need to highlight all records that are not wrote into DB,

hakimio
5 Jul 2016, 2:04 AM
Check record "dirty" property to see if it's still true after the store sync().

American horizon
13 Jul 2016, 5:51 AM
Check record "dirty" property to see if it's still true after the store sync().
I think that to allow ext js to understand which records are wrote correctly and which not, i should respect some type of convention in the servlet response.
Which is this convention ?