Index: topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceImplGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceImplGenerator.java:1.10 topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceImplGenerator.java:1.11 --- topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceImplGenerator.java:1.10 Fri Jul 22 16:57:57 2005 +++ topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceImplGenerator.java Tue Jul 26 13:17:17 2005 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.10 $ + * @version $Revision: 1.11 $ * - * Mise a jour: $Date: 2005/07/22 16:57:57 $ + * Mise a jour: $Date: 2005/07/26 13:17:17 $ * par : $Author: thimel $ */ @@ -107,7 +107,7 @@ public <%=attribute.getDeclaringElement().getName()%> findBy<%=Util.capitalize(attribute.getName())%>(<%=Util.getAttributeType(attribute)%> value) throws TopiaException{ List result = find(newQuery().where("<%=attribute.getName()%> = ?").addArg(value)); if(result.size() == 0){ - throw new TopiaNotFoundException("Can't find object with attribute <%=attribute.getName()%> == " + value); + return null;/*throw new TopiaNotFoundException("Can't find object with attribute <%=attribute.getName()%> == " + value);*) } return (<%=attribute.getDeclaringElement().getName()%>)result.get(0); } @@ -135,7 +135,7 @@ public <%=clazz.getName()%> findBy<%=Util.capitalize(attribute.getName())%>(<%=Util.getAttributeType(attribute)%> value) throws TopiaException { List result = find(newQuery().where("<%=attribute.getName()%> = ?").addArg(value)); if(result.size() == 0){ - throw new TopiaNotFoundException("Can't find object with attribute <%=attribute.getName()%> == " + value); + return null;/*throw new TopiaNotFoundException("Can't find object with attribute <%=attribute.getName()%> == " + value);*) } return (<%=clazz.getName()%>)result.get(0); }