From afc49f435ffb6039205cad6a3e6a758ba950217d Mon Sep 17 00:00:00 2001 From: Shawn Clowater Date: Thu, 15 Nov 2012 10:01:32 -0700 Subject: [PATCH] Changed the error handling for LazyInitializationException to go through the throwLazyInitializationException method so that the collection role is reported. --- .../collection/internal/AbstractPersistentCollection.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java b/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java index 75323d23d6..4ed942faf1 100644 --- a/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java +++ b/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java @@ -183,7 +183,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers isTempSession = true; } else { - throw new LazyInitializationException( "could not initialize proxy - no Session" ); + throwLazyInitializationException( "could not initialize proxy - no Session" ); } } else if ( !session.isOpen() ) { @@ -193,7 +193,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers isTempSession = true; } else { - throw new LazyInitializationException( "could not initialize proxy - the owning Session was closed" ); + throwLazyInitializationException( "could not initialize proxy - the owning Session was closed" ); } } else if ( !session.isConnected() ) { @@ -203,7 +203,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers isTempSession = true; } else { - throw new LazyInitializationException( "could not initialize proxy - the owning Session is disconnected" ); + throwLazyInitializationException( "could not initialize proxy - the owning Session is disconnected" ); } }