Index: topia/src/java/org/codelutin/topia/persistence/TopiaPersistenceProxy.java diff -u topia/src/java/org/codelutin/topia/persistence/TopiaPersistenceProxy.java:1.6 topia/src/java/org/codelutin/topia/persistence/TopiaPersistenceProxy.java:1.7 --- topia/src/java/org/codelutin/topia/persistence/TopiaPersistenceProxy.java:1.6 Fri Aug 12 16:21:35 2005 +++ topia/src/java/org/codelutin/topia/persistence/TopiaPersistenceProxy.java Tue Aug 16 08:11:48 2005 @@ -23,9 +23,9 @@ * Created: 16 juillet 2005 23:52:35 CEST * * @author Benjamin POUSSIN -* @version $Revision: 1.6 $ +* @version $Revision: 1.7 $ * -* Last update: $Date: 2005/08/12 16:21:35 $ +* Last update: $Date: 2005/08/16 08:11:48 $ * by : $Author: thimel $ */ @@ -231,18 +231,18 @@ TopiaEntity value, boolean isAnyToOne) throws Exception { TopiaEntity r = null; - //FIXME le methode findByAttributes(A,B) n'est pas trouvée if(isAnyToOne){ Object[] args = new Object[2]; if(thisField.compareTo(otherField) < 0){ - args[0] = entity; - args[1] = value; - }else{ args[0] = value; args[1] = entity; + }else{ + args[0] = entity; + args[1] = value; } r = (TopiaEntity)MethodUtils.invokeMethod( assoPS, "findByAttributes", args); + //TODO A tester dans le cas où la classe d'assoc existe en BD ! if(r == null){ r = assoPS.create(); MethodUtils.invokeMethod(r,