Marco Pas
2011-01-07 09:22:00 UTC
Hi there,
when looping though a collection a get a java.util.ConcurrentModificationException on the code below.
The idea is that i want to remove the relation between all 'contacts' inside a 'contactgroup'. This is a many to many relationship.
contactGroup?.contacts?.each{ contact ->
contact.removeFromContactGroups(contactGroup).save(flush:true)
}
I am not removing any contacts but only the relationship, how can i avoid the java.util.ConcurrentModificationException ?
-- Marco
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
when looping though a collection a get a java.util.ConcurrentModificationException on the code below.
The idea is that i want to remove the relation between all 'contacts' inside a 'contactgroup'. This is a many to many relationship.
contactGroup?.contacts?.each{ contact ->
contact.removeFromContactGroups(contactGroup).save(flush:true)
}
I am not removing any contacts but only the relationship, how can i avoid the java.util.ConcurrentModificationException ?
-- Marco
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email