HHH-11944 The getDelegate() method here is the method from EntityManager
It should not return the delegate but the current Session impl proper. The name is a bit misleading but it comes from JPA so we cannot do anything about it.
This commit is contained in:
parent
626c8abc71
commit
3620e1e47e
|
@ -618,9 +618,14 @@ public class SessionDelegatorBaseImpl implements SessionImplementor {
|
||||||
return delegate.unwrap( cls );
|
return delegate.unwrap( cls );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is an implementation of EntityManager#getDelegate(). It returns the current session and not the delegate
|
||||||
|
* session as it is what we want. The name of the method is misleading here but, as it is part of JPA, we cannot do
|
||||||
|
* anything about it.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object getDelegate() {
|
public Object getDelegate() {
|
||||||
return delegate;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue