mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-03-07 18:29:29 +00:00
HHH-13790 Temporary session not being closed
This commit is contained in:
parent
27aff6eb01
commit
7780b74c21
@ -238,7 +238,7 @@ else if ( !session.isConnected() ) {
|
||||
|
||||
SharedSessionContractImplementor originalSession = null;
|
||||
boolean isJTA = false;
|
||||
|
||||
try {
|
||||
if ( tempSession != null ) {
|
||||
isTempSession = true;
|
||||
originalSession = session;
|
||||
@ -259,10 +259,9 @@ else if ( !session.isConnected() ) {
|
||||
session.getSessionFactory()
|
||||
.getMappingMetamodel()
|
||||
.getCollectionDescriptor( getRole() );
|
||||
session.getPersistenceContextInternal().addUninitializedDetachedCollection( collectionDescriptor, this );
|
||||
session.getPersistenceContextInternal()
|
||||
.addUninitializedDetachedCollection( collectionDescriptor, this );
|
||||
}
|
||||
|
||||
try {
|
||||
return lazyInitializationWork.doWork();
|
||||
}
|
||||
finally {
|
||||
|
Loading…
x
Reference in New Issue
Block a user