diff --git a/hibernate-core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java b/hibernate-core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java index 7659362473..51c47e1bef 100644 --- a/hibernate-core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java +++ b/hibernate-core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java @@ -197,7 +197,16 @@ public class JavassistLazyInitializer extends BasicLazyInitializer implements Me } returnValue = thisMethod.invoke( target, args ); } - return returnValue == target && returnValue.getClass().isInstance(proxy) ? proxy : returnValue; + + if ( returnValue == target ) { + if ( returnValue.getClass().isInstance(proxy) ) { + return proxy; + } + else { + LOG.narrowingProxy( returnValue.getClass() ); + } + } + return returnValue; } catch ( InvocationTargetException ite ) { throw ite.getTargetException();