db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r1658228 - in /db/jdo/trunk: copyjdorijars/pom.xml tck/src/java/org/apache/jdo/tck/query/jdoql/IfElseInFilter.java tck/src/java/org/apache/jdo/tck/query/result/IfElseResult.java
Date Sun, 08 Feb 2015 17:57:10 GMT
Author: mbo
Date: Sun Feb  8 17:57:09 2015
New Revision: 1658228

URL: http://svn.apache.org/r1658228
Log:
JDO-650: upgrade to latest DN; add new test case to IfElseInFilter; updated negative tests

Modified:
    db/jdo/trunk/copyjdorijars/pom.xml
    db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/IfElseInFilter.java
    db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/result/IfElseResult.java

Modified: db/jdo/trunk/copyjdorijars/pom.xml
URL: http://svn.apache.org/viewvc/db/jdo/trunk/copyjdorijars/pom.xml?rev=1658228&r1=1658227&r2=1658228&view=diff
==============================================================================
--- db/jdo/trunk/copyjdorijars/pom.xml (original)
+++ db/jdo/trunk/copyjdorijars/pom.xml Sun Feb  8 17:57:09 2015
@@ -93,22 +93,22 @@
     <dependency>
       <groupId>org.datanucleus</groupId>
       <artifactId>datanucleus-core</artifactId>
-      <version>4.0.4</version>
+      <version>4.1.0-m1</version>
     </dependency>
     <dependency>
       <groupId>org.datanucleus</groupId>
       <artifactId>datanucleus-rdbms</artifactId>
-      <version>4.0.5</version>
+      <version>4.1.0-m1</version>
     </dependency>
     <dependency>
       <groupId>org.datanucleus</groupId>
       <artifactId>datanucleus-api-jdo</artifactId>
-      <version>4.0.4</version>
+      <version>4.1.0-m1</version>
     </dependency>
     <dependency>
       <groupId>org.datanucleus</groupId>
       <artifactId>datanucleus-api-jpa</artifactId>
-      <version>4.0.5</version>
+      <version>4.1.0-m1</version>
     </dependency>
     <dependency>
       <groupId>c3p0</groupId>

Modified: db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/IfElseInFilter.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/IfElseInFilter.java?rev=1658228&r1=1658227&r2=1658228&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/IfElseInFilter.java (original)
+++ db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/IfElseInFilter.java Sun Feb 
8 17:57:09 2015
@@ -19,6 +19,7 @@ package org.apache.jdo.tck.query.jdoql;
 
 import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.company.CompanyModelReader;
+import org.apache.jdo.tck.pc.company.DentalInsurance;
 import org.apache.jdo.tck.pc.company.Employee;
 import org.apache.jdo.tck.pc.company.FullTimeEmployee;
 import org.apache.jdo.tck.query.QueryElementHolder;
@@ -67,7 +68,21 @@ public class IfElseInFilter extends Quer
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "(IF (this.manager == null) this.mentor.department ELSE this.manager.department)
== this.department",
+        /*WHERE*/       "(IF (this.manager == null) this.mentor.department.deptid ELSE this.manager.department.deptid)
== this.department.deptid",
+        /*VARIABLES*/   null,
+        /*PARAMETERS*/  null,
+        /*IMPORTS*/     null,
+        /*GROUP BY*/    null,
+        /*ORDER BY*/    "this.personid",
+        /*FROM*/        null,
+        /*TO*/          null),
+        new QueryElementHolder(
+        /*UNIQUE*/      null,
+        /*RESULT*/      null,
+        /*INTO*/        null, 
+        /*FROM*/        FullTimeEmployee.class,
+        /*EXCLUDE*/     null,
+        /*WHERE*/       "(IF (this.salary < 10001.0) 1 ELSE IF (this.salary < 20001.0)
2 ELSE IF (this.salary < 30001.0) 3 ELSE 4) == 2",
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
@@ -87,9 +102,9 @@ public class IfElseInFilter extends Quer
         /*UNIQUE*/      null,
         /*RESULT*/      null,
         /*INTO*/        null, 
-        /*FROM*/        FullTimeEmployee.class,
+        /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "IF (this.department) 0 ELSE 1",
+        /*WHERE*/       "(IF (this.firstname) 0 ELSE 1) == 0",
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
@@ -102,9 +117,9 @@ public class IfElseInFilter extends Quer
         /*UNIQUE*/      null,
         /*RESULT*/      null,
         /*INTO*/        null, 
-        /*FROM*/        FullTimeEmployee.class,
+        /*FROM*/        DentalInsurance.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "IF (this.department.name == 'Development') 15000",
+        /*WHERE*/       "(IF (this.employee == null) 15000) == 15000",
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
@@ -117,9 +132,9 @@ public class IfElseInFilter extends Quer
         /*UNIQUE*/      null,
         /*RESULT*/      null,
         /*INTO*/        null, 
-        /*FROM*/        Employee.class,
+        /*FROM*/        DentalInsurance.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "IF (this.department == null) 'Michael' ELSE this.department",
+        /*WHERE*/       "(IF (this.employee == null) 'Michael' ELSE this.employee) == 'Michael'",
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
@@ -134,7 +149,8 @@ public class IfElseInFilter extends Quer
      */
     private Object[] expectedResult = {
         getTransientCompanyModelInstancesAsList(new String[]{"emp1", "emp5"}),
-        getTransientCompanyModelInstancesAsList(new String[]{"emp1", "emp2", "emp3", "emp4",
"emp5"})
+        getTransientCompanyModelInstancesAsList(new String[]{"emp1", "emp2", "emp3"}),
+        getTransientCompanyModelInstancesAsList(new String[]{"emp1"})
     };
     
     /**

Modified: db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/result/IfElseResult.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/result/IfElseResult.java?rev=1658228&r1=1658227&r2=1658228&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/result/IfElseResult.java (original)
+++ db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/result/IfElseResult.java Sun Feb  8
17:57:09 2015
@@ -101,7 +101,7 @@ public class IfElseResult extends QueryT
         // Invalid type of condition expression 
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "IF (this.firstName) 0 ELSE 1",
+        /*RESULT*/      "IF (this.firstname) 0 ELSE 1",
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,



Mime
View raw message