Can you try
entry.childEntries.clear
entry.save
?

-------------------------------------
GA<[email protected]> 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 the code I am using to remove:

for (entryToRemove <- entry.childEntries) {
 val indexOf = entry.childEntries.indexOf(entryToRemove)
 entry.childEntries.remove(indexOf)
}
entry.save

This code is supposed to remove all the entries in the relationship table, but 
it does nothing.

The class I am using to define the ManyToMany table is an extension of Mapper, 
not LongKeyedMapper. This is because I do not really need an extra field just 
for the primary key. Could this be the problem?

Any suggestions?

Thanks in advance,

GA

--
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to