Re: [Lift] How to remove manyTomany children?

2010-01-06 Thread Guillermo Acilu
But this will remove the entity as well, am I right? On Jan 6, 2010, at 12:09 AM, Naftoli Gugenheim wrote: > Just call .delete_! on the entity itself. It should automatically remove the > relationships. > > - > GA wrote: > > I would like to remove them from

Re: [Lift] How to remove manyTomany children?

2010-01-05 Thread Naftoli Gugenheim
Just call .delete_! on the entity itself. It should automatically remove the relationships. - GA wrote: I would like to remove them from the database, not only the relationship. How should I do that? Thanks, On Jan 5, 2010, at 9:42 PM, Naftoli Gugenheim wr

Re: [Lift] How to remove manyTomany children?

2010-01-05 Thread GA
I would like to remove them from the database, not only the relationship. How should I do that? Thanks, On Jan 5, 2010, at 9:42 PM, Naftoli Gugenheim wrote: > Are they not getting removed from the collection when you call clear, or are > they not getting deleted in the database when you call

Re: [Lift] How to remove manyTomany children?

2010-01-05 Thread Naftoli Gugenheim
Are they not getting removed from the collection when you call clear, or are they not getting deleted in the database when you call save? Also, are you trying to delete the actual entity? Clear and remove just delete the relationship. - GA wrote: It does not

Re: [Lift] How to remove manyTomany children?

2010-01-05 Thread GA
It does not work either with the LongKeyedMapper. Am I doing something wrong? On Jan 5, 2010, at 7:25 PM, Guillermo Acilu wrote: > It was the first thing I tried. But it does not work. > > I have run out of options now. I am going to try to add a LongKeyMapper to > see if the problem gets sol

Re: [Lift] How to remove manyTomany children?

2010-01-05 Thread Guillermo Acilu
It was the first thing I tried. But it does not work. I have run out of options now. I am going to try to add a LongKeyMapper to see if the problem gets solved. On Jan 5, 2010, at 7:12 PM, Naftoli Gugenheim wrote: > Can you try > entry.childEntries.clear > entry.save > ? > >

Re: [Lift] How to remove manyTomany children?

2010-01-05 Thread Naftoli Gugenheim
Can you try entry.childEntries.clear entry.save ? - GA wrote: Hello guys, I have a table that has a many-to-many relationship with itself. I manage to add new entries to the relationship table using the MapperManyToMany, but I cannot remove entries. This is

[Lift] How to remove manyTomany children?

2010-01-05 Thread GA
Hello guys, I have a table that has a many-to-many relationship with itself. I manage to add new entries to the relationship table using the MapperManyToMany, but I cannot remove entries. This is the code I am using to remove: for (entryToRemove <- entry.childEntries) { val indexOf = entry.ch