The first time (after a page reload) I delete a record, it works. But when I try to delete another record, the store tries to delete it and any previously deleted records (that, of course, do not exist).
The setup is very vanilla:-
idProperty: 'Traffic_id' in the Model
autoSync: true in the Store
store.remove(selection) to delete a record in buttonHandler
record disappears from Grid. (not sure exactly when this happens)
The URL contains the record primary key (113)
request is DELETE http://localhost:8080/ws-db-webapp/w...=1417520097782
Java backend deletes the record from the DB
response is 200 OK (though this is not significant)
JSON {Traffic_id : 113, message : "OK", success : true} (I dont think Traffic_id is important here)
Thats it. There is no significant code of mine being executed after the request
The success:true attribute should tell ExtJS that the record was successfully deleted from the DB and can be forgotten about. But it is not forgotten and will be "deleted" again (and again) next time I try to delete another record which leads to RecordNotFound DB errors
I am pretty sure this used to work but it was weeks ago and I cannot easily roll the code back as the DB has changed.
It am guessing that the "removed" holder of pending deletes is not cleared for some reason. Where and how would I check this?
Peter
Delete from Rest Store will keep deleting already deleted records
Aucun commentaire:
Enregistrer un commentaire