db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an...@apache.org
Subject svn commit: r614851 - in /db/jdo/trunk: tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/ tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/
Date Thu, 24 Jan 2008 11:42:44 GMT
Author: andyj
Date: Thu Jan 24 03:42:34 2008
New Revision: 614851

URL: http://svn.apache.org/viewvc?rev=614851&view=rev
Log:
Fix use of "Employee" in single-string queries since should be fully-qualified. Fix missing
parameter in NonCorrelated test

Modified:
    db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueries.java
    db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java
    db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/MultipleCallsReplaceSubquery.java
    db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java
    db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullCandidateCollectionExpression.java
    db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullSubqueryParameter.java
    db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/UnmodifiedSubqueryInstance.java
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueries.java
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/MultipleCallsReplaceSubquery.java
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullCandidateCollectionExpression.java
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullSubqueryParameter.java
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/UnmodifiedSubqueryInstance.java

Modified: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueries.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueries.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueries.java
(original)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueries.java
Thu Jan 24 03:42:34 2008
@@ -64,7 +64,7 @@
         // Select employees who work more than the average of 
         // their department employees. 
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " + 
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +

             "(SELECT AVG(e.weeklyhours) FROM this.department.employees e)";
 
         // API query

Modified: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java
(original)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java
Thu Jan 24 03:42:34 2008
@@ -76,7 +76,7 @@
         // Select employees who work more than the average of the employees 
         // in their department having the same manager
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " +
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +
             "(SELECT AVG(e.weeklyhours) FROM this.department.employees e " + 
             " WHERE e.manager == this.manager)";
 
@@ -111,8 +111,10 @@
         // Select employees hired after a particular date who work more 
         // than the average of all employees of the same manager
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.hiredate > :hired && this.weeklyhours
> " +
-            "(SELECT AVG(e.weeklyhours) FROM Employee e WHERE e.manager == this.manager)";

+            "SELECT FROM " + Employee.class.getName() + 
+            " WHERE this.hiredate > :hired && this.weeklyhours > " +
+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + 
+            " e WHERE e.manager == this.manager)"; 
 
         Calendar cal = Calendar.getInstance(
             TimeZone.getTimeZone("America/New_York"), Locale.US);
@@ -149,8 +151,9 @@
         // Select employees who work more than the average of all 
         // employees of the same manager
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " +
-            "(SELECT AVG(e.weeklyhours) FROM Employee e WHERE e.manager == this.manager)";
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +
+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() +
+            " e WHERE e.manager == this.manager)";
 
         // API query
         Query sub = pm.newQuery(Employee.class);

Modified: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/MultipleCallsReplaceSubquery.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/MultipleCallsReplaceSubquery.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/MultipleCallsReplaceSubquery.java
(original)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/MultipleCallsReplaceSubquery.java
Thu Jan 24 03:42:34 2008
@@ -63,8 +63,8 @@
 
         // select employees who work more than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " + 
-            "(SELECT AVG(e.weeklyhours) FROM Employee e)";
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +

+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + " e)";
 
         // API query
         // Query returning the weeklyhours of employee with id 1

Modified: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java
(original)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java
Thu Jan 24 03:42:34 2008
@@ -73,8 +73,8 @@
 
         // select employees who work more than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " + 
-            "(SELECT AVG(e.weeklyhours) FROM Employee e)";
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +

+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + " e)";
 
         // API query
         Query sub = pm.newQuery(Employee.class);
@@ -105,8 +105,8 @@
         // Select employees hired after a particular date who work more 
         // than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.hiredate > :hired && " + 
-            "this.weeklyhours> (SELECT AVG(e.weeklyhours) FROM Employee e)";
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.hiredate > :hired
&& " + 
+            "this.weeklyhours> (SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName()
+ " e)";
 
         Calendar cal = Calendar.getInstance(
             TimeZone.getTimeZone("America/New_York"), Locale.US);
@@ -126,7 +126,7 @@
         List allEmployees = getAllEmployees(pm);
         apiQuery.setCandidates(allEmployees);
         executeJDOQuery(ASSERTION_FAILED, apiQuery, singleStringJDOQL, 
-                        false, null, expectedResult, true);
+                        false, new Object[]{hired}, expectedResult, true);
 
         // single String JDOQL
         Query singleStringQuery = pm.newQuery(singleStringJDOQL);

Modified: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullCandidateCollectionExpression.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullCandidateCollectionExpression.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullCandidateCollectionExpression.java
(original)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullCandidateCollectionExpression.java
Thu Jan 24 03:42:34 2008
@@ -66,8 +66,8 @@
 
         // select employees who work more than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " +
-            "(SELECT AVG(e.weeklyhours) FROM Employee e)";
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +
+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + " e)";
 
         // API query
         Query sub = pm.newQuery(Employee.class);

Modified: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullSubqueryParameter.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullSubqueryParameter.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullSubqueryParameter.java
(original)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullSubqueryParameter.java
Thu Jan 24 03:42:34 2008
@@ -63,12 +63,13 @@
             new String[]{"emp1", "emp2", "emp4", "emp6", "emp7", "emp10"});
 
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours = emp.weeklyhours && " +
-            "emp.firstName = 'emp1First' VARIABLES Employee emp";
+            "SELECT FROM " + Employee.class.getName() + 
+            " WHERE this.weeklyhours == emp.weeklyhours && " +
+            "emp.firstName == 'emp1First' VARIABLES Employee emp";
 
         // API query
         Query apiQuery = pm.newQuery(Employee.class);
-        apiQuery.setFilter("this.weeklyhours > emp.weeklyhours && emp.firstName
= 'emp1First'");
+        apiQuery.setFilter("this.weeklyhours > emp.weeklyhours && emp.firstName
== 'emp1First'");
         // null subquery parameter
         apiQuery.addSubquery(null, "Employee emp", null); 
         executeJDOQuery(ASSERTION_FAILED, apiQuery, singleStringJDOQL, 

Modified: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/UnmodifiedSubqueryInstance.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/UnmodifiedSubqueryInstance.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/UnmodifiedSubqueryInstance.java
(original)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/query/jdoql/subqueries/UnmodifiedSubqueryInstance.java
Thu Jan 24 03:42:34 2008
@@ -75,10 +75,10 @@
 
         // select average weeklyhours of all employees
         String singleStringJDOQLSubquery =
-            "SELECT AVG(e.weeklyhours) FROM Employee e";
+            "SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + " e";
         // select employees who work more than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " + 
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +

             "(" + singleStringJDOQLSubquery + ")";
 
         // execute subquery
@@ -106,8 +106,8 @@
 
         // select employees who work more than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " + 
-            "(SELECT AVG(e.weeklyhours) FROM Employee e)";
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +

+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + " e)";
 
         // create subquery instance using different pm
         PersistenceManager newPM = 

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueries.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueries.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueries.java
(original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueries.java
Thu Jan 24 03:42:34 2008
@@ -64,7 +64,7 @@
         // Select employees who work more than the average of 
         // their department employees. 
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " + 
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +

             "(SELECT AVG(e.weeklyhours) FROM this.department.employees e)";
 
         // API query

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java
(original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java
Thu Jan 24 03:42:34 2008
@@ -76,7 +76,8 @@
         // Select employees who work more than the average of the employees 
         // in their department having the same manager
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " +
+            "SELECT FROM " + Employee.class.getName() +
+            " WHERE this.weeklyhours > " +
             "(SELECT AVG(e.weeklyhours) FROM this.department.employees e " + 
             " WHERE e.manager == this.manager)";
 
@@ -111,8 +112,10 @@
         // Select employees hired after a particular date who work more 
         // than the average of all employees of the same manager
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.hiredate > :hired && this.weeklyhours
> " +
-            "(SELECT AVG(e.weeklyhours) FROM Employee e WHERE e.manager == this.manager)";

+            "SELECT FROM " + Employee.class.getName() +
+            " WHERE this.hiredate > :hired && this.weeklyhours > " +
+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() +
+            " e WHERE e.manager == this.manager)"; 
 
         Calendar cal = Calendar.getInstance(
             TimeZone.getTimeZone("America/New_York"), Locale.US);
@@ -149,8 +152,9 @@
         // Select employees who work more than the average of all 
         // employees of the same manager
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " +
-            "(SELECT AVG(e.weeklyhours) FROM Employee e WHERE e.manager == this.manager)";
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +
+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() +
+            " e WHERE e.manager == this.manager)";
 
         // API query
         Query sub = pm.newQuery(Employee.class);

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/MultipleCallsReplaceSubquery.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/MultipleCallsReplaceSubquery.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/MultipleCallsReplaceSubquery.java
(original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/MultipleCallsReplaceSubquery.java
Thu Jan 24 03:42:34 2008
@@ -63,8 +63,8 @@
 
         // select employees who work more than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " + 
-            "(SELECT AVG(e.weeklyhours) FROM Employee e)";
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +

+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + " e)";
 
         // API query
         // Query returning the weeklyhours of employee with id 1

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java
(original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java
Thu Jan 24 03:42:34 2008
@@ -73,8 +73,9 @@
 
         // select employees who work more than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " + 
-            "(SELECT AVG(e.weeklyhours) FROM Employee e)";
+            "SELECT FROM " + Employee.class.getName() +
+            " WHERE this.weeklyhours > " + 
+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + " e)";
 
         // API query
         Query sub = pm.newQuery(Employee.class);
@@ -105,8 +106,10 @@
         // Select employees hired after a particular date who work more 
         // than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.hiredate > :hired && " + 
-            "this.weeklyhours> (SELECT AVG(e.weeklyhours) FROM Employee e)";
+            "SELECT FROM " + Employee.class.getName() +
+            " WHERE this.hiredate > :hired && " + 
+            "this.weeklyhours> (SELECT AVG(e.weeklyhours) FROM " +
+            Employee.class.getName() + " e)";
 
         Calendar cal = Calendar.getInstance(
             TimeZone.getTimeZone("America/New_York"), Locale.US);
@@ -126,7 +129,7 @@
         List allEmployees = getAllEmployees(pm);
         apiQuery.setCandidates(allEmployees);
         executeJDOQuery(ASSERTION_FAILED, apiQuery, singleStringJDOQL, 
-                        false, null, expectedResult, true);
+                        false, new Object[]{hired}, expectedResult, true);
 
         // single String JDOQL
         Query singleStringQuery = pm.newQuery(singleStringJDOQL);

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullCandidateCollectionExpression.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullCandidateCollectionExpression.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullCandidateCollectionExpression.java
(original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullCandidateCollectionExpression.java
Thu Jan 24 03:42:34 2008
@@ -66,8 +66,8 @@
 
         // select employees who work more than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " +
-            "(SELECT AVG(e.weeklyhours) FROM Employee e)";
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +
+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + " e)";
 
         // API query
         Query sub = pm.newQuery(Employee.class);

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullSubqueryParameter.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullSubqueryParameter.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullSubqueryParameter.java
(original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NullSubqueryParameter.java
Thu Jan 24 03:42:34 2008
@@ -63,14 +63,15 @@
             new String[]{"emp1", "emp2", "emp4", "emp6", "emp7", "emp10"});
 
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours == emp.weeklyhours && "
+
+            "SELECT FROM " + Employee.class.getName() +
+            " WHERE this.weeklyhours == emp.weeklyhours && " +
             "emp.firstname == 'emp1First' VARIABLES Employee emp";
 
         // API query
         Query apiQuery = pm.newQuery(Employee.class);
         apiQuery.setFilter("this.weeklyhours > emp.weeklyhours && emp.firstname
== 'emp1First'");
         // null subquery parameter
-        apiQuery.addSubquery(null, "Employee emp", null); 
+        apiQuery.addSubquery(null, Employee.class.getName() + " emp", null); 
         executeJDOQuery(ASSERTION_FAILED, apiQuery, singleStringJDOQL, 
                         false, null, expectedResult, true);
 

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/UnmodifiedSubqueryInstance.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/UnmodifiedSubqueryInstance.java?rev=614851&r1=614850&r2=614851&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/UnmodifiedSubqueryInstance.java
(original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/jdoql/subqueries/UnmodifiedSubqueryInstance.java
Thu Jan 24 03:42:34 2008
@@ -78,7 +78,7 @@
             "SELECT AVG(e.weeklyhours) FROM Employee e";
         // select employees who work more than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " + 
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +

             "(" + singleStringJDOQLSubquery + ")";
 
         // execute subquery
@@ -106,8 +106,8 @@
 
         // select employees who work more than the average of all employees
         String singleStringJDOQL = 
-            "SELECT FROM Employee WHERE this.weeklyhours > " + 
-            "(SELECT AVG(e.weeklyhours) FROM Employee e)";
+            "SELECT FROM " + Employee.class.getName() + " WHERE this.weeklyhours > " +

+            "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + " e)";
 
         // create subquery instance using different pm
         PersistenceManager newPM = 



Mime
View raw message