openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hthom...@apache.org
Subject svn commit: r1756539 - in /openjpa/trunk: ./ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestTableGeneratorUseSchemaNameProp.java
Date Tue, 16 Aug 2016 18:08:54 GMT
Author: hthomann
Date: Tue Aug 16 18:08:54 2016
New Revision: 1756539

URL: http://svn.apache.org/viewvc?rev=1756539&view=rev
Log:
OPENJPA-2650: When SchemaFactory and useSchemaName=false is set, a schema name is incorrectly
used.  Merged 2.2.x commit to trunk.

Added:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestTableGeneratorUseSchemaNameProp.java
      - copied unchanged from r1756538, openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestTableGeneratorUseSchemaNameProp.java
Modified:
    openjpa/trunk/   (props changed)
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java

Propchange: openjpa/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 16 18:08:54 2016
@@ -2,5 +2,5 @@
 /openjpa/branches/2.0.x:1504611
 /openjpa/branches/2.1.x:1415379,1415398,1485010,1513249,1517838,1530146,1533218,1533280,1539188,1569528,1575444,1591536,1636464,1655218,1662610,1673300,1673491,1686894,1709201,1709309,1750036
 /openjpa/branches/2.2.1.x:1415367,1415413,1415425,1504719,1508186,1530347,1533222,1539193,1651808,1686910
-/openjpa/branches/2.2.x:1384400,1415459-1415460,1415469,1485013,1530364,1533223,1580898,1580939,1591681,1631786,1641906,1642555,1666312,1686911,1700884,1702143,1728038,1756046
+/openjpa/branches/2.2.x:1384400,1415459-1415460,1415469,1485013,1530364,1533223,1580898,1580939,1591681,1631786,1641906,1642555,1666312,1686911,1700884,1702143,1728038,1756046,1756538
 /openjpa/branches/2.3.x:1533462,1535560,1536912,1540277,1564121

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java?rev=1756539&r1=1756538&r2=1756539&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java
Tue Aug 16 18:08:54 2016
@@ -642,7 +642,12 @@ public class TableJDBCSeq extends Abstra
     public DBIdentifier resolveTableIdentifier(ClassMapping mapping, Table table) {
         DBIdentifier sName = mapping.getTable().getSchemaIdentifier();
         DBIdentifier tableName = DBIdentifier.NULL;
-        if (DBIdentifier.isNull(sName)) {
+        
+        //OPENJPA-2650: Don't use a schema name if the user has requested,
+        //via useSchemaName, to not use one.
+        if (!_conf.getDBDictionaryInstance().useSchemaName){
+            tableName = table.getIdentifier();
+        } else if (DBIdentifier.isNull(sName)) {
             tableName = table.getFullIdentifier();
         } else if (!DBIdentifier.isNull(table.getSchemaIdentifier())) {
             tableName = table.getFullIdentifier();



Mime
View raw message