From b8e6cb6011059d826e9cb9f24ff67efa4c35ea64 Mon Sep 17 00:00:00 2001 From: Catalina Wei Date: Fri, 21 Mar 2008 21:46:55 +0000 Subject: [PATCH] OPENJPA-541 Generate SQL92 JOIN syntax for Oracle 9 or later releases git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.0.x@639874 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/openjpa/jdbc/sql/OracleDictionary.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java index 29c4ff11c..65977fcb3 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java @@ -191,7 +191,7 @@ public class OracleDictionary 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 @@ public class OracleDictionary 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)) {