You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Brian Nelson <br...@yahoo.com> on 2008/05/01 07:07:42 UTC

Re: Error when adding and then removing object from relationship before committing

Thanks so much for the fast response. Now what is the best way for me to get the latest cayenne so
I can test this in my application?

Brian


--- Andrus Adamchik <an...@objectstyle.org> wrote:

> Hi Brian,
> 
> On Apr 30, 2008, at 8:04 AM, Brian Nelson wrote:
> 
> > Let me start this post by thanking the Cayenne dev team for their  
> > great work. The project I'm
> > working on switched from Hibernate to Cayenne several months ago. I  
> > can honestly say the decision
> > to switch is one of the best things that ever happened to my project.
> 
> Cool. Would be nice to hear the details ;-)
> 
> 
> > Now on to my problem...
> >
> > I have a situation where I
> >
> > 1. Add a newly created object to a relationship.
> >
> >        EstimateRoom room = context.newObject(EstimateRoom.class);
> >
> >        // Several lines configuring variables in room
> >
> >        floorModel.getEstimate().addToRooms(room);
> >
> > 2. Remove the object from the relationship
> >
> >        estimate.removeFromRooms(obj);
> >    	context.deleteObject(obj);
> >
> > 3. Attempt to commit to the parent DataContext
> >
> > This works as long as the object is the last element contained in  
> > the List maintaining the
> > relationship. If it is in the middle of the List(I sort the list  
> > after the room is inserted) then
> > I receive the following exception.
> 
> This turned out to be a bug. I already committed the fix. It will be a  
> part of M4:
> 
> https://issues.apache.org/cayenne/browse/CAY-1044
> 
> Andrus
> 


Re: Error when adding and then removing object from relationship before committing

Posted by Aristedes Maniatis <ar...@ish.com.au>.
On 01/05/2008, at 3:07 PM, Brian Nelson wrote:

> Thanks so much for the fast response. Now what is the best way for  
> me to get the latest cayenne so
> I can test this in my application?

Go to the Cayenne web site and click "download" in the left menu.  
You'll find milestones, stable releases and nightly builds.

Ari



-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A