[hibernate-commits] Hibernate SVN: r16876 - core/branches/Branch_3_2/src/org/hibernate/loader.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Mon Jun 22 22:27:53 EDT 2009


Author: steve.ebersole at jboss.com
Date: 2009-06-22 22:27:53 -0400 (Mon, 22 Jun 2009)
New Revision: 16876

Modified:
   core/branches/Branch_3_2/src/org/hibernate/loader/BasicLoader.java
   core/branches/Branch_3_2/src/org/hibernate/loader/MultipleBagFetchException.java
Log:
HHH-3980 - Fix for HHH-2980 introduced bug that allows the same bag collection role to be fetched multiple times


Modified: core/branches/Branch_3_2/src/org/hibernate/loader/BasicLoader.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/loader/BasicLoader.java	2009-06-23 02:27:39 UTC (rev 16875)
+++ core/branches/Branch_3_2/src/org/hibernate/loader/BasicLoader.java	2009-06-23 02:27:53 UTC (rev 16876)
@@ -1,8 +1,8 @@
 //$Id$
 package org.hibernate.loader;
 
-import java.util.Set;
-import java.util.HashSet;
+import java.util.List;
+import java.util.ArrayList;
 
 import org.hibernate.engine.SessionFactoryImplementor;
 import org.hibernate.persister.entity.Loadable;
@@ -47,14 +47,14 @@
 		}
 
 		CollectionPersister[] collectionPersisters = getCollectionPersisters();
-		Set bagRoles = null;
+		List bagRoles = null;
 		if ( collectionPersisters != null ) {
 			String[] collectionSuffixes = getCollectionSuffixes();
 			collectionDescriptors = new CollectionAliases[collectionPersisters.length];
 			for ( int i = 0; i < collectionPersisters.length; i++ ) {
 				if ( isBag( collectionPersisters[i] ) ) {
 					if ( bagRoles == null ) {
-						bagRoles = new HashSet();
+						bagRoles = new ArrayList();
 					}
 					bagRoles.add( collectionPersisters[i].getRole() );
 				}

Modified: core/branches/Branch_3_2/src/org/hibernate/loader/MultipleBagFetchException.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/loader/MultipleBagFetchException.java	2009-06-23 02:27:39 UTC (rev 16875)
+++ core/branches/Branch_3_2/src/org/hibernate/loader/MultipleBagFetchException.java	2009-06-23 02:27:53 UTC (rev 16876)
@@ -23,7 +23,7 @@
  */
 package org.hibernate.loader;
 
-import java.util.Set;
+import java.util.List;
 
 import org.hibernate.HibernateException;
 
@@ -34,19 +34,19 @@
 * @author Steve Ebersole
 */
 public class MultipleBagFetchException extends HibernateException {
-	private final Set bagRoles;
+	private final List bagRoles;
 
-	public MultipleBagFetchException(Set bagRoles) {
+	public MultipleBagFetchException(List bagRoles) {
 		super( "cannot simultaneously fetch multiple bags" );
 		this.bagRoles = bagRoles;
 	}
 
 	/**
-	 * Retrieves the set of collection roles for the bags encountered.
+	 * Retrieves the collection-roles for the bags encountered.
 	 *
 	 * @return The bag collection roles.
 	 */
-	public Set getBagRoles() {
+	public List getBagRoles() {
 		return bagRoles;
 	}
 }




More information about the hibernate-commits mailing list