cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r552319 - in /cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne: access/DataContextEJBQLIsNullTest.java unit/AccessStackAdapter.java unit/FrontBaseStackAdapter.java
Date Sun, 01 Jul 2007 13:44:10 GMT
Author: aadamchik
Date: Sun Jul  1 06:44:09 2007
New Revision: 552319

URL: http://svn.apache.org/viewvc?view=rev&rev=552319
Log:
CAY-821 EJBQL resolution: FrontBase limitations
skipping failing unit tests

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLIsNullTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/unit/AccessStackAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/unit/FrontBaseStackAdapter.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLIsNullTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLIsNullTest.java?view=diff&rev=552319&r1=552318&r2=552319
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLIsNullTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLIsNullTest.java
Sun Jul  1 06:44:09 2007
@@ -28,6 +28,12 @@
 public class DataContextEJBQLIsNullTest extends CayenneCase {
 
     public void testCompareToNull() throws Exception {
+        // the query below can blow up on FrontBase. See CAY-819 for details.
+
+        if (!getAccessStackAdapter().supportsEqualNullSyntax()) {
+            return;
+        }
+
         deleteTestData();
         createTestData("prepare");
 
@@ -41,8 +47,6 @@
         // most do not; per JPA spec the result is undefined.. so we can't make any
         // assertions about the result. Just making sure the query doesn't blow up
         createDataContext().performQuery(query1);
-        
-        // still this query can blow up on FrontBase. See CAY-819 for details.
     }
 
     public void testIsNull() throws Exception {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/unit/AccessStackAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/unit/AccessStackAdapter.java?view=diff&rev=552319&r1=552318&r2=552319
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/unit/AccessStackAdapter.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/unit/AccessStackAdapter.java
Sun Jul  1 06:44:09 2007
@@ -145,6 +145,13 @@
     }
 
     /**
+     * Returns whether the database supports synatax like "X = NULL".
+     */
+    public boolean supportsEqualNullSyntax() {
+        return true;
+    }
+
+    /**
      * Returns false if stored procedures are not supported or if it is a victim of
      * CAY-148 (column name capitalization).
      */

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/unit/FrontBaseStackAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/unit/FrontBaseStackAdapter.java?view=diff&rev=552319&r1=552318&r2=552319
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/unit/FrontBaseStackAdapter.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/unit/FrontBaseStackAdapter.java
Sun Jul  1 06:44:09 2007
@@ -41,6 +41,10 @@
     public boolean supportsLobInsertsAsStrings() {
         return false;
     }
+    
+    public boolean supportsEqualNullSyntax() {
+        return false;
+    }
 
     public void willDropTables(Connection conn, DataMap map, Collection tablesToDrop)
             throws Exception {



Mime
View raw message