Andrus Adamchik <andru..bjectstyle.org> wrote:
> Hmm.. if an exception is thrown on commit, Cayenne doesn't alter the
> state of the objects, leaving DataContext intact. So if you are seeing
> transient objects in a list, they likely appeared there before the
> commit was called. Here is one hypothetical scenario - you create a new
> object, add it to relationship, and then delete the other side of
> relationship with "CASCADE" delete rule. As a result NEW object becomes
> transient (but still before commit).
I'm sorry. I wasn't quite clear enough (at least in the body of the
This is after a commitChanges(), Exception, rollback().
After a failed Commit, I would expect the DataContext to be identical, but I
was hoping the rollback would reverse such changes.
> On Sep 6, 2004, at 2:30 PM, Mike Kienenberger wrote:
> > I'm still using 1.1M5.
> > I'm noting that after a database failure on a commit, my toMany
> > relationship
> > list contains a transient DataObject for the object that would have
> > been
> > created and committed.
> > Is this expected behavior?
> > If not, was it fixed in later 1.1 releases? (I hate to upgrade cayenne
> > right now since we're planning on going live with production next
> > week).
> > If it's expected behavior, is my only option to invalidate all objects
> > that
> > I suspect have transient leftovers?
> > -Mike
This archive was generated by hypermail 2.0.0 : Tue Sep 07 2004 - 11:13:15 EDT