cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From and...@apache.org
Subject svn commit: r897991 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/EJBQLQueryTest.java
Date Mon, 11 Jan 2010 18:26:44 GMT
Author: andrey
Date: Mon Jan 11 18:26:43 2010
New Revision: 897991

URL: http://svn.apache.org/viewvc?rev=897991&view=rev
Log:
Test for CAY-1032

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/EJBQLQueryTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/EJBQLQueryTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/EJBQLQueryTest.java?rev=897991&r1=897990&r2=897991&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/EJBQLQueryTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/EJBQLQueryTest.java
Mon Jan 11 18:26:43 2010
@@ -278,6 +278,28 @@
         context.performQuery(query);
     }
     
+    public void testJoinAndCount() {
+        ObjectContext context = createDataContext();
+        
+        EJBQLQuery query = new EJBQLQuery(
+            "select count(p) from Painting p where p.toGallery.galleryName LIKE '%a%' AND
(" +
+            "p.paintingTitle like '%a%' or " +
+            "p.toArtist.artistName like '%a%'" +
+            ")");
+        context.performQuery(query);
+    }
+    
+//    SELECT COUNT(p) from Product p where p.vsCatalog.id = 1 and
+//    (
+//    p.displayName like '%rimadyl%'
+//    or p.manufacturer.name like '%rimadyl%'
+//    or p.description like '%rimadyl%'
+//    or p.longdescription like '%rimadyl%'
+//    or p.longdescription2 like '%rimadyl%'
+//    or p.manufacturerPartNumber like '%rimadyl%'
+//    or p.partNumber like '%rimadyl%'
+//    ) 
+    
     public void testRelationshipWhereClause() throws Exception {
         deleteTestData();
         ObjectContext context = createDataContext();



Mime
View raw message