openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fa...@apache.org
Subject svn commit: r905898 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java
Date Wed, 03 Feb 2010 05:26:59 GMT
Author: fancy
Date: Wed Feb  3 05:26:58 2010
New Revision: 905898

URL: http://svn.apache.org/viewvc?rev=905898&view=rev
Log:
OPENJPA-1493: Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect
The JUnit regression uncovers an issue in Criteria Query
add @AllowFailure in TestTypesafeCriteria.testValues5(), it is found the expected sql is incorrect.
A separate issue will address this problem.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java?rev=905898&r1=905897&r2=905898&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java Wed
Feb  3 05:26:58 2010
@@ -1990,7 +1990,7 @@
         if (pj != null && pj.path() != null)
             key = new Key(pj.path().toString(), key);
 
-        if (_ctx != null)
+        if (_ctx != null && (_parent != null || _subsels != null))
             i = findAliasForQuery(table, pj, key, create);
 
         if (i != null)

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java?rev=905898&r1=905897&r2=905898&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java
Wed Feb  3 05:26:58 2010
@@ -1161,6 +1161,7 @@
         executeAndCompareSQL(q, sql);
     }
 
+    @AllowFailure(message="The expected sql string is incorrect")
     public void testValues5() {
         String sql = "SELECT t0.name, t2.id, t2.label FROM CR_ITEM t0 "
             + "INNER JOIN CR_ITEM_photos t1 ON t0.id = t1.ITEM_ID "



Mime
View raw message