RE: Behavior of "remove(object)" on ToManyList

2007-05-30 Thread Kevin Menard
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 30, 2007 8:15 AM > To: user@cayenne.apache.org > Subject: Re: Behavior of "remove(object)" on ToManyList > > ... and create its own set of problems. The data in

Re: Behavior of "remove(object)" on ToManyList

2007-05-30 Thread Craig L Russell
On May 29, 2007, at 8:20 PM, Kevin Menard wrote: -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: Thursday, May 24, 2007 5:52 AM To: user@cayenne.apache.org Subject: Re: Behavior of "remove(object)" on ToManyList Hi Alex, Well, actually one

Re: Behavior of "remove(object)" on ToManyList

2007-05-30 Thread Andrus Adamchik
30, 2007, at 6:20 AM, Kevin Menard wrote: -Original Message- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: Thursday, May 24, 2007 5:52 AM To: user@cayenne.apache.org Subject: Re: Behavior of "remove(object)" on ToManyList Hi Alex, Well, actually one of Cayenne responsib

RE: Behavior of "remove(object)" on ToManyList

2007-05-29 Thread Kevin Menard
> -Original Message- > From: Andrus Adamchik [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 24, 2007 5:52 AM > To: user@cayenne.apache.org > Subject: Re: Behavior of "remove(object)" on ToManyList > > Hi Alex, > > Well, actually one of Ca

Re: Behavior of "remove(object)" on ToManyList

2007-05-24 Thread Alexander Lamb
Thanks a lot. It is indeed the correct way to handle the problem. Alex On Thursday, May 24, 2007, at 11:52AM, "Andrus Adamchik" <[EMAIL PROTECTED]> wrote: >Hi Alex, > >Well, actually one of Cayenne responsibilities is maintaining >consistent object graph. To-many lists are a part of that obje

Re: Behavior of "remove(object)" on ToManyList

2007-05-24 Thread Andrus Adamchik
Hi Alex, Well, actually one of Cayenne responsibilities is maintaining consistent object graph. To-many lists are a part of that object graph. So if you want to remove an object from the list for presentation reasons, but keep the relationship intact, the only right way is to clone the li

Re: Behavior of "remove(object)" on ToManyList

2007-05-24 Thread Alexander Lamb
Thanks Andrus, however, I am not doing relationship management in that case. Actually, I do NOT want to remove the center from the selected country. What I am doing is taking the centers and removing some items to present to the user the centers which are not already present in another relationsh

Re: Behavior of "remove(object)" on ToManyList

2007-05-24 Thread Andrus Adamchik
I suggest using "getSelectedCountry().removeFromCenters(..)" for consistent behavior. As for the remove, maybe we should fire a list fault for consistency, but this hasn't been a big deal as relationship management is better done via special methods. Andrus On May 24, 2007, at 10:54 AM, A

Behavior of "remove(object)" on ToManyList

2007-05-24 Thread Alexander Lamb
Hello list, I am fetching a "List" of objects (a too many relationship). Then in a loop, I am removing some objects: List rcs = getRegistry().getRegistryCenters(); List centers = getSelectedCountry().getCenters(); for(RegistryCenter rc:rcs) {