cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From and...@apache.org
Subject svn commit: r891791 - in /cayenne/main/branches/STABLE-3.0: docs/doc/src/main/resources/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/ framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/
Date Thu, 17 Dec 2009 16:28:03 GMT
Author: andrey
Date: Thu Dec 17 16:27:52 2009
New Revision: 891791

URL: http://svn.apache.org/viewvc?rev=891791&view=rev
Log:
CAY-1341

Modified:
    cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLFromTranslator.java
    cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/EJBQLQueryTest.java

Modified: cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=891791&r1=891790&r2=891791&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt Thu Dec
17 16:27:52 2009
@@ -26,6 +26,7 @@
 CAY-1333 Entering a custom Java Type in CM for an ObjEntity blanks out DB fields
 CAY-1334 Modeler is trying to load data object classes when selecting a query
 CAY-1335 Modeler cannot unset inheritance
+CAY-1341 EJBQL: joins on joined table not added to generated SQL
 
 ----------------------------------
 Release: 3.0 beta 1

Modified: cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLFromTranslator.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLFromTranslator.java?rev=891791&r1=891790&r2=891791&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLFromTranslator.java
(original)
+++ cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLFromTranslator.java
Thu Dec 17 16:27:52 2009
@@ -76,6 +76,9 @@
                 null,
                 new EJBQLTableId(join.getLeftHandSideId()),
                 new EJBQLTableId(join.getRightHandSideId()));
+        
+        //fix 1341-mark current join position for probable future joins to this join
+        context.markCurrentPosition(EJBQLJoinAppender.makeJoinTailMarker(join.getRightHandSideId()));
         return false;
     }
 
@@ -91,6 +94,7 @@
                 null,
                 new EJBQLTableId(join.getLeftHandSideId()),
                 new EJBQLTableId(join.getRightHandSideId()));
+        context.markCurrentPosition(EJBQLJoinAppender.makeJoinTailMarker(join.getRightHandSideId()));
         return false;
     }
 }

Modified: cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/EJBQLQueryTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/EJBQLQueryTest.java?rev=891791&r1=891790&r2=891791&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/EJBQLQueryTest.java
(original)
+++ cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/EJBQLQueryTest.java
Thu Dec 17 16:27:52 2009
@@ -26,6 +26,7 @@
 import org.apache.art.Artist;
 import org.apache.art.Painting;
 import org.apache.cayenne.DataRow;
+import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.access.DataContext;
 import org.apache.cayenne.ejbql.EJBQLCompiledExpression;
 import org.apache.cayenne.map.EntityResolver;
@@ -269,4 +270,12 @@
         query.setParameter("x", null);
         createDataContext().performQuery(query);
     }
+    
+    public void testJoinToJoined() {
+        ObjectContext context = createDataContext();
+        
+        EJBQLQuery query = new EJBQLQuery(
+            "select g from Gallery g inner join g.paintingArray p where p.toArtist.artistName
like '%a%'");
+        context.performQuery(query);
+    }
 }



Mime
View raw message