Friday, 18 August
2006
Fri, 18 Aug
'06
4:50 p.m.
Author: epbernard
Date: 2006-08-18 17:50:41 -0400 (Fri, 18 Aug 2006)
New Revision: 10290
Modified:
trunk/Hibernate3/src/org/hibernate/persister/collection/AbstractCollectionPersister.java
Log:
HHH-2015 add parenthesis around <class where=/> or <collection where=/>
clauses, allowing safe multi term clauses
Modified:
trunk/Hibernate3/src/org/hibernate/persister/collection/AbstractCollectionPersister.java
===================================================================
---
trunk/Hibernate3/src/org/hibernate/persister/collection/AbstractCollectionPersister.java 2006-08-18
21:50:16 UTC (rev 10289)
+++
trunk/Hibernate3/src/org/hibernate/persister/collection/AbstractCollectionPersister.java 2006-08-18
21:50:41 UTC (rev 10290)
@@ -523,7 +523,9 @@
// Handle any filters applied to this collection for many-to-many
manyToManyFilterHelper = new FilterHelper( collection.getManyToManyFilterMap(),
dialect, factory.getSqlFunctionRegistry() );
- manyToManyWhereString = collection.getManyToManyWhere();
+ manyToManyWhereString = StringHelper.isNotEmpty( collection.getManyToManyWhere() ) ?
+ "( " + collection.getManyToManyWhere() + ")" :
+ null;
manyToManyWhereTemplate = manyToManyWhereString == null ?
null :
Template.renderWhereStringTemplate( manyToManyWhereString, factory.getDialect(),
factory.getSqlFunctionRegistry() );
Show replies by date