You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the server responds to a sync request that contains
events : {
removed : [{ id : 1 }, { id : 2}]
}
with a response that contains
events : {
removed : [{ id : 1}]
}
The it should restore record id 2 from the Store's removedBag.
The code in CrudManager does strange things. AbstractCrudManager.getRowsToApplyChangesTo collects respondedIds and if the responded ids do not contain all the ids that weer passed to the server in the remove block, it adds them back in.
So the server can never respond with a reply that tells the CrudManager it didn't manage to delete the records. If the server sends rows : [{ id <deleted record Id> }], the record will be considered an added record.
As it stands, I cannot see the store's removed Bag being processed at all. The removed records stay in there after the sync response.
This area needs some thorough testing using t.mockAjax.
The text was updated successfully, but these errors were encountered:
Forum post
If the server responds to a sync request that contains
with a response that contains
The it should restore record id
2
from the Store'sremoved
Bag
.The code in CrudManager does strange things.
AbstractCrudManager.getRowsToApplyChangesTo
collectsrespondedIds
and if the responded ids do not contain all the ids that weer passed to the server in theremove
block, it adds them back in.So the server can never respond with a reply that tells the CrudManager it didn't manage to delete the records. If the server sends
rows : [{ id <deleted record Id> }]
, the record will be considered an added record.As it stands, I cannot see the store's
removed
Bag being processed at all. The removed records stay in there after the sync response.This area needs some thorough testing using
t.mockAjax
.The text was updated successfully, but these errors were encountered: