Andrus Adamchik <andru..bjectstyle.org> wrote:
> Let me try to test it and see if it is a bug.
Ok.
Or, since you think the behavior is wrong, I can go ahead and create an JIRA
issue and an example.
I just wasn't sure if I was expecting too much :)
-Mike
> On Sep 9, 2004, at 2:11 PM, Mike Kienenberger wrote:
> > Andrus,
> >
> > I'm still confused why a toMany list is wrong after a rollback.
> > Currently, I have to do a rollback followed by invalidateObjects for
> > aUser
> > to remove the transient object in my
> > aUser.getUserAccountRelationshipList()
> > list.
> >
> > -Mike
> >
> > // simplified code snippet:
> >
> > UserAccountRelationship newUserAccountRelationshipObject =
> > (UserAccountRelationship)aDataContext.createAndRegisterNewObject("UserA
> > ccountRelationship");
> > aUserAccountRelationship.setUserObject(aUser);
> >
> > try
> > {
> > aDataContext.commitChanges();
> > }
> > catch (CayenneRuntimeException aCayenneRuntimeException)
> > {
> > aDataContext.rollbackChanges();
> >
> > // seemingly unnecessary invalidateObjects() call
> > aDataContext.invalidateObjects(Collections.singletonList(aUser));
> >
> > // rest of error handling
> > }
> >
>
This archive was generated by hypermail 2.0.0 : Thu Sep 09 2004 - 17:28:04 EDT