cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Big list'o questions.....
Date Sun, 02 Mar 2008 19:52:38 GMT

On Mar 2, 2008, at 9:11 PM, Andrus Adamchik wrote:

>> 3. The documentation states that when you call rollbackChanges() a
>> transaction the DataContext state is restored to the state it had
>> before. Does it do this by using "copies" of the objects it has read
>> or is the database re-queried?
> Rollback is a local operation. No DB access is performed.

This requires a bit of explanation. While rollback operation does not  
perform any DB queries, modified objects are turned into "hollow"  
objects. I.e. they will be re-read from the DB lazily on the first  
access... Now, with DataDomain object snapshot caching underneath the  
DataContext, this still means no DB access in most cases. Still some  
internal Cayenne activity will happen to restore the state.


View raw message