So for a bit of context, I've got an expense claims application with an association of One Claim has many Expenses.
When editing the Claim there is a table within that claim that shows all the expenses associated with it. You can create new expenses and edit or delete them. Now if I commit the expenses the claim itself gets committed which results in incomplete claims in the database.
I had a work around where expenses do not commit but merely refresh in client and the claim submit button iterates through all the expenses and commits them, which worked nicely up until I tested editing the individual expenses.
Because an expense hasn't been committed until the entire claim is saved, if an expense is opened for edit and then cancelled (with rollback) it will always revert to the last commit (deleting if it's a new expense, or back to what it was when the claim was last saved), if I don't roll back it will look fine on the claim once the expense pop up closes but remain in memory and commit with the change
So finally the question: is it possible for me to store the changes temporarily, not in the database, so I can rollback to them when closing a page?