openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fa...@apache.org
Subject svn commit: r639874 - in /openjpa: branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
Date Fri, 21 Mar 2008 21:46:56 GMT
Author: fancy
Date: Fri Mar 21 14:46:55 2008
New Revision: 639874

URL: http://svn.apache.org/viewvc?rev=639874&view=rev
Log:
OPENJPA-541 Generate SQL92 JOIN syntax for Oracle 9 or later releases

Modified:
    openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java

Modified: openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java?rev=639874&r1=639873&r2=639874&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
(original)
+++ openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
Fri Mar 21 14:46:55 2008
@@ -191,7 +191,7 @@
                 int release = Integer.parseInt(productVersion);
                 
                 // warn sql92
-                if (release == 8) {
+                if (release <= 8) {
                     if (joinSyntax == SYNTAX_SQL92 && log.isWarnEnabled())
                         log.warn(_loc.get("oracle-syntax"));
                     joinSyntax = SYNTAX_DATABASE;
@@ -199,10 +199,12 @@
                     timestampTypeName = "DATE"; // added oracle 9
                     supportsXMLColumn = false;
                 }
-                else 
+                else {
                     // select of an xml column requires ".getStringVal()"
                     // suffix. eg. t0.xmlcol.getStringVal()
                     getStringVal = ".getStringVal()";
+                    joinSyntax = SYNTAX_SQL92;
+                }
             } else if (metadataClassName.startsWith("com.ddtek.")
                 || url.indexOf("jdbc:datadirect:oracle:") != -1
                 || "Oracle".equals(driverName)) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java?rev=639874&r1=639873&r2=639874&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
Fri Mar 21 14:46:55 2008
@@ -198,7 +198,7 @@
                 int release = Integer.parseInt(productVersion);
                 
                 // warn sql92
-                if (release == 8) {
+                if (release <= 8) {
                     if (joinSyntax == SYNTAX_SQL92 && log.isWarnEnabled())
                         log.warn(_loc.get("oracle-syntax"));
                     joinSyntax = SYNTAX_DATABASE;
@@ -206,10 +206,12 @@
                     timestampTypeName = "DATE"; // added oracle 9
                     supportsXMLColumn = false;
                 }
-                else 
+                else {
                     // select of an xml column requires ".getStringVal()"
                     // suffix. eg. t0.xmlcol.getStringVal()
                     getStringVal = ".getStringVal()";
+                    joinSyntax = SYNTAX_SQL92;
+                }
             } else if (metadataClassName.startsWith("com.ddtek.")
                 || url.indexOf("jdbc:datadirect:oracle:") != -1
                 || "Oracle".equals(driverName)) {



Mime
View raw message