Index: topia/src/java/org/codelutin/topia/persistence/TopiaPersistenceProxy.java diff -u topia/src/java/org/codelutin/topia/persistence/TopiaPersistenceProxy.java:1.24 topia/src/java/org/codelutin/topia/persistence/TopiaPersistenceProxy.java:1.25 --- topia/src/java/org/codelutin/topia/persistence/TopiaPersistenceProxy.java:1.24 Fri Dec 9 10:27:22 2005 +++ topia/src/java/org/codelutin/topia/persistence/TopiaPersistenceProxy.java Tue Jan 10 11:37:06 2006 @@ -23,9 +23,9 @@ * Created: 16 juillet 2005 23:52:35 CEST * * @author Benjamin POUSSIN -* @version $Revision: 1.24 $ +* @version $Revision: 1.25 $ * -* Last update: $Date: 2005/12/09 10:27:22 $ +* Last update: $Date: 2006/01/10 11:37:06 $ * by : $Author: thimel $ */ @@ -40,6 +40,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Date; +import java.util.Iterator; import java.util.List; import org.apache.commons.beanutils.MethodUtils; import org.apache.commons.lang.ObjectUtils; @@ -602,11 +603,22 @@ } } else { if(MethodInfoHelper.isFieldModifier(method)){ - if(methodName.startsWith("_add")){ - addFieldAssociationCardinalityN( - assoPS, partyA, thisField, otherField, entity, - (TopiaEntity)args[0], otherCardinality[1] == 1); + if(methodName.startsWith("_addAll") && args[0] instanceof Collection){ + Collection coll = (Collection)args[0]; + if (coll != null) { + Iterator it = coll.iterator(); + while (it.hasNext()) { + addFieldAssociationCardinalityN( + assoPS, partyA, thisField, otherField, entity, + (TopiaEntity)it.next(), otherCardinality[1] == 1); + } + } return null; + } else if(methodName.startsWith("_add")){ + addFieldAssociationCardinalityN( + assoPS, partyA, thisField, otherField, entity, + (TopiaEntity)args[0], otherCardinality[1] == 1); + return null; } else if(methodName.startsWith("_remove")){ removeFieldAssociationCardinalityN( assoPS, thisField, otherField, entity,