Index: topia2/src/java/org/codelutin/topia/generator/DAOAbstractGenerator.java diff -u topia2/src/java/org/codelutin/topia/generator/DAOAbstractGenerator.java:1.17 topia2/src/java/org/codelutin/topia/generator/DAOAbstractGenerator.java:1.18 --- topia2/src/java/org/codelutin/topia/generator/DAOAbstractGenerator.java:1.17 Wed Dec 5 16:21:16 2007 +++ topia2/src/java/org/codelutin/topia/generator/DAOAbstractGenerator.java Fri Dec 7 08:24:10 2007 @@ -24,9 +24,9 @@ * Created: 12 déc. 2005 * * @author Arnaud Thimel -* @version $Revision: 1.17 $ +* @version $Revision: 1.18 $ * -* Mise a jour: $Date: 2007-12-05 16:21:16 $ +* Mise a jour: $Date: 2007-12-07 08:24:10 $ * par : $Author: ruchaud $ */ @@ -273,7 +273,7 @@ *) private List getRequestPermission(String topiaId, int actions, String query, Class daoClass) throws TopiaException { TopiaContextImplementor context = getParentDAO().getContext(); - List result = context.find(query, topiaId); + List result = context.find(query, "id", topiaId); List resultPermissions = new ArrayList(); for (String topiaIdPermission : result) { @@ -317,10 +317,10 @@ String query = ""; String daoClass = ""; if(className.equals(clazz.getQualifiedName())) { - query = "select " + attributeName + ".topiaId from " + clazz.getQualifiedName() + " where topiaId = ?"; + query = "select " + attributeName + ".topiaId from " + clazz.getQualifiedName() + " where topiaId = :id"; daoClass = clazz.getAttribute(attributeName).getClassifier().getQualifiedName(); } else { - query = "select at.topiaId from " + clazz.getQualifiedName() + " cl, " + className + " at where topiaId = ? and at." + attributeName + " in cl"; + query = "select at.topiaId from " + clazz.getQualifiedName() + " cl, " + className + " at where topiaId = :id and at." + attributeName + " in cl"; daoClass = className; } /*{ resultPermissions.addAll(getRequestPermission(topiaId, <%=actions%>, "<%=query%>", <%=daoClass%>.class));