7.1.3.2 Effect of Save and Refresh

When a save is performed on an Item, any changes recorded for that Item in the Session are persisted and the record of that change in the Session is removed. From the perspective of the application, the apparent state of the Item itself does not change (apart from the values returned by isNew or isModified), since the item has reflected the changes since they were initially made. If one or more of the pending changes cause an exception to be thrown on save, then no pending changes are saved, not even those which did not cause the problem. In this case the set of pending changes recorded on the session is left unaffected.

When a refresh(false) is performed on an Item, any pending changes recorded for that Item in the Session are discarded and the state of the Item object reverts to its current saved state in the workspace. If an exception occurs on refresh, the set of pending changes recorded on the session is left unaffected and Item state is similarly unaffected.