Re: Big list'o questions.....

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Mar 02 2008 - 14:52:38 EST

  • Next message: Frits Jalvingh: "Re: Big list'o questions....."

    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.

    Andrus



    This archive was generated by hypermail 2.0.0 : Sun Mar 02 2008 - 14:53:10 EST