openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r710015 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java
Date Mon, 03 Nov 2008 06:36:50 GMT
Author: awhite
Date: Sun Nov  2 22:36:49 2008
New Revision: 710015

URL: http://svn.apache.org/viewvc?rev=710015&view=rev
Log:
Use full table name according to DBDictionary when constructing GetMapValue
subquery, which may include schema.


Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java?rev=710015&r1=710014&r2=710015&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/GetMapValue.java
Sun Nov  2 22:36:49 2008
@@ -185,10 +185,10 @@
         for (int i = 0; i < values.length; i++) {
             if (i > 0)
                 sql.append(", ");
-            sql.append(values[i].getFullName());
+            sql.append(values[i].getTable()).append(".").append(values[i]);
         }
-        sql.append(" FROM ").append(values[0].getTable().getFullName()).
-            append(" WHERE ");
+        sql.append(" FROM ").append(values[0].getTable());
+        sql.append(" WHERE ");
 
         // add in the joins
         ContainerFieldStrategy.appendUnaliasedJoin(sql, sel, null, 
@@ -200,7 +200,7 @@
         Object[] vals = (cols.length == 1) ? null : (Object[]) key;
 
         for (int i = 0; i < cols.length; i++) {
-            sql.append(cols[i].getFullName());
+            sql.append(cols[i].getTable()).append(".").append(cols[i]);
             if (vals == null)
                 sql.append((key == null) ? " IS " : " = ").
                     appendValue(key, cols[i]);



Mime
View raw message