[hibernate-commits] Hibernate SVN: r10289 - branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/collection

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Aug 18 17:50:18 EDT 2006


Author: epbernard
Date: 2006-08-18 17:50:16 -0400 (Fri, 18 Aug 2006)
New Revision: 10289

Modified:
   branches/Branch_3_2/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: branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/collection/AbstractCollectionPersister.java
===================================================================
--- branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/collection/AbstractCollectionPersister.java	2006-08-18 21:46:52 UTC (rev 10288)
+++ branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/collection/AbstractCollectionPersister.java	2006-08-18 21:50:16 UTC (rev 10289)
@@ -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() );




More information about the hibernate-commits mailing list