On Sep 20, 2013, at 9:41 PM, Markus Reich <[email protected]> wrote:
> Hi, > > is there a way to get a unchanged (original version) of a CayenneDataObject > that is changed and not commited? Or does a rollback reload data from DB? > > regards > Markus Rollback reverts the changes without a DB trip. So a rollback will give you an unchanged version (and the uncommitted changes will be gone forever). If you want to keep the changes, but still have a version of the same DataObject that represents the DB state, you might create a second parallel ObjectContext and look up that object there. There are also ways to pick at cached snapshot of the changed object. HTH, Andrus
