Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/query
In directory sc8-pr-cvs1:/tmp/cvs-serv25122/cirrus/hibernate/query
Modified Files:
QueryTranslator.java
Log Message:
use OuterJoinGenerator for normalized table mappings
Index: QueryTranslator.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/QueryTranslator.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** QueryTranslator.java 24 Nov 2002 06:30:12 -0000 1.48
--- QueryTranslator.java 25 Nov 2002 02:21:10 -0000 1.49
***************
*** 626,632 ****
//render the " and foo.class in ( 'Foo', 'Bar' ) " bit
String where = p.getQueryWhereClause(name);
if ( where!=null ) {
! if (!first) inClassWheres.append(" and "); first=false;
inClassWheres.append(where);
}
--- 626,639 ----
//render the " and foo.class in ( 'Foo', 'Bar' ) " bit
String where = p.getQueryWhereClause(name);
+ String ojWhere = p.outerJoinsAfterWhere(name);
if ( where!=null ) {
! if (!first) inClassWheres.append(" and ");
! first=false;
inClassWheres.append(where);
+ }
+ if (ojWhere.length()>1) { //UGLY
+ if (first) ojWhere = ojWhere.substring(5); //get rid of leading " AND "?
+ first=false;
+ inClassWheres.append(ojWhere);
}
|