cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugi Thordarson <h...@karlmenn.is>
Subject Re: Committed values of an object
Date Tue, 25 Aug 2015 21:24:01 GMT
DataContext dataContext = (DataContext)object.getObjectContext();
ObjectStore objectStore = dataContext.getObjectStore();
DataRow snapshot = objectStore.getSnapshot( object.getObjectId() );

Note that the keys in the returned snapshot correspond to your DbEntity rather than your ObjEntity.

Cheers,
- hugi



> On 25. ágú. 2015, at 21:07, Lon Varscsak <lon.varscsak@gmail.com> wrote:
> 
> Is there a way to get the committed value of a property?  There have been a
> few times with EOF where comparing the current value with the committed
> snapshot is handy.
> 
> -Lon


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message