mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-27 14:30:16 +00:00
Changed the error handling for LazyInitializationException to go through the throwLazyInitializationException method so that the collection role is reported.
This commit is contained in:
parent
f4fc7f21a4
commit
1286c2319c
@ -183,7 +183,7 @@ private <T> T withTemporarySessionIfNeeded(LazyInitializationWork<T> lazyInitial
|
||||
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 @@ else if ( !session.isOpen() ) {
|
||||
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 @@ else if ( !session.isConnected() ) {
|
||||
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" );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user