[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2330?page=all ]
Riccardo Palombella updated HHH-2330:
-------------------------------------
Attachment: FieldInterceptionHelper.java
Implementation containing my patch to this issue.
If loaded entity is cglib enhanced,
FieldInterceptionHelper.injectFieldInterceptor() fails to find the field interceptor
interface on the entity, leaving the interceptor null
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-2330
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2330
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.1
Reporter: James Sparrow
Priority: Critical
Attachments: FieldInterceptionHelper.java, patch1
After upgrading from Hibernate 3.1.3 to Hibernate 3.2.1, entities with lazy property
fetching enabled ceased lazily loading the properties. I tracked this down to a problem in
the way FieldInterceptionHelper locates the interceptor interfaces on classes. If the
loaded entity (i.e., coming through PojoEntityTuplizer.afterInitialize()) is already cglib
enhanced, the FieldInterceptionHandler's use of entity.getClass().getInterfaces() will
fail to locate the InterceptFieldEnabled interface on the instrumented superclass of the
entity (since getInterfaces() only returns interfaces on the type, not supertypes).
This can be fixed by retrieving all interfaces on the class and its superclasses (see
attached patch).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira