File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Src/NHibernate.Envers/Tools Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,10 @@ public static object GetTargetFromProxy(ISessionImplementor session, INHibernate
34
34
var lazyInitializer = proxy . HibernateLazyInitializer ;
35
35
var proxySession = ( ISession ) lazyInitializer . Session ;
36
36
37
- using ( var tempSession = proxySession == null
37
+ var tempSession = proxySession == null
38
38
? CreateChildSession ( ( ISession ) session )
39
- : CreateChildSession ( proxySession ) )
40
- {
41
- return tempSession . Get ( lazyInitializer . EntityName , lazyInitializer . Identifier ) ;
42
- }
39
+ : CreateChildSession ( proxySession ) ;
40
+ return tempSession . Get ( lazyInitializer . EntityName , lazyInitializer . Identifier ) ;
43
41
}
44
42
45
43
public static bool ObjectsEqual ( object obj1 , object obj2 )
@@ -98,7 +96,7 @@ public static bool ArraysEqual(object[] array1, object[] array2)
98
96
99
97
public static ISession CreateChildSession ( ISession session )
100
98
{
101
- return session . SessionWithOptions ( ) . Connection ( ) . Interceptor ( ) . OpenSession ( ) ;
99
+ return session . SessionWithOptions ( ) . Connection ( ) . ConnectionReleaseMode ( ) . FlushMode ( ) . Interceptor ( ) . OpenSession ( ) ;
102
100
}
103
101
}
104
102
}
You can’t perform that action at this time.
0 commit comments