I'm doing a store.sync() batch save
For example i save 5 records.
4 of them in php were succesfully saved and one have an error.
php returns json with success: false, data: with array of 4 successfully saves records

I need to process in failure callback of sync that the 4 records refreshed data is commit in store, because of success = false it does'nt commit any records by default.

How ?

vietits

9 Nov 2012, 6:50 PM

For updating/creating requests if you return successful response then all newly created/modified records will be committed, if you return failed response then all records will not be committed. So with your case, I think you have to process the response and do the committing records by yourself. You can do this by some ways:
- Defining callbacks for store.sync():