[jboss-user] [EJB 3.0] - deletion of few elements in one to many collection.
jdijkmeijer
do-not-reply at jboss.com
Sun Jul 22 09:45:08 EDT 2007
Hi I'm trying to remove a few child elements from a onetomany relationship.
like :
| for (Role r : presentRolesToRemove.keySet()) {
| focusSubject.getActors().remove(presentRolesToRemove.get(r));
| }
|
(presentRolesToRemove being a Map<Role,Actor>)
But doing a em.merge(focusSubject); does not remove the childs from the database. Should I do a em.delete(presentRolesToRemove.get(r)); explicitely within the for-loop?
Or is there annotation to circumvent this manual deletion?
Thanks in advance.
jeroen.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066472#4066472
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066472
More information about the jboss-user
mailing list