[hibernate-commits] Hibernate SVN: r10290 - trunk/Hibernate3/src/org/hibernate/persister/collection

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


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() );




More information about the hibernate-commits mailing list