Closed kdiogenes closed 10 years ago
This is the expected behavior. The model is still deleted on the client and whatever error that happened needs to be resolved and flush()
be called again. If your application wants to handle the error differently and instead revert the deletion, it can manually set the isDeleted
property on the model back to true.
If you want cleaner isolation for changes like this, I would look into child sessions.
Let's supose that you have the classic Post <-> Comments relationship like this:
If you have the a list tha show the comments for a post and in each one you have a delete button that calls the following action:
When flush fail, the alert is fired and the comment is removed from the list, needing a page reload to make it visible again.