cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r666062 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java
Date Tue, 10 Jun 2008 11:08:27 GMT
Author: aadamchik
Date: Tue Jun 10 04:08:27 2008
New Revision: 666062

URL: http://svn.apache.org/viewvc?rev=666062&view=rev
Log:
CAY-1072 org.apache.cayenne.query.SQLResultSetMapping must implement java.io.Serializable
(tweaking EJBQL algorithms to make them work with ROP)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java?rev=666062&r1=666061&r2=666062&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java
Tue Jun 10 04:08:27 2008
@@ -33,7 +33,6 @@
 import org.apache.cayenne.ejbql.EJBQLExpression;
 import org.apache.cayenne.ejbql.EJBQLExpressionVisitor;
 import org.apache.cayenne.map.DbAttribute;
-import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.DbJoin;
 import org.apache.cayenne.map.DbRelationship;
 import org.apache.cayenne.map.EntityResolver;
@@ -194,10 +193,9 @@
         descriptor.visitAllProperties(visitor);
 
         // append id columns ... (some may have been appended already via relationships)
-        DbEntity table = descriptor.getEntity().getDbEntity();
-        for (DbAttribute pk : table.getPrimaryKeys()) {
-            if (visited.add(pk.getName())) {
-                entityResult.addDbField(pk.getName(), prefix + index[0]++);
+        for (String pkName : descriptor.getEntity().getPrimaryKeyNames()) {
+            if (visited.add(pkName)) {
+                entityResult.addDbField(pkName, prefix + index[0]++);
             }
         }
 



Mime
View raw message