Author: tfischer Date: Sat Feb 12 07:36:25 2011 New Revision: 1070039 URL: http://svn.apache.org/viewvc?rev=1070039&view=rev Log: fix joins for the case that schema prefixes are used in table names
Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/JoinBuilder.java Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/JoinBuilder.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/JoinBuilder.java?rev=1070039&r1=1070038&r2=1070039&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/JoinBuilder.java (original) +++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/JoinBuilder.java Sat Feb 12 07:36:25 2011 @@ -94,6 +94,9 @@ public final class JoinBuilder leftTableName = SQLBuilder.getTableNameForFromClause(leftTableName, criteria); + leftTableName = SQLBuilder.getFullTableName( + leftTableName, + criteria.getDbName()); dot = rightColumn.lastIndexOf('.'); String rightTableName = rightColumn.substring(0, dot); @@ -107,6 +110,9 @@ public final class JoinBuilder rightTableName = SQLBuilder.getTableNameForFromClause( rightTableName, criteria); + rightTableName = SQLBuilder.getFullTableName( + rightTableName, + criteria.getDbName()); // now check the join type and add the join to the // appropriate places in the query --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org