if to specify explicitly the <class name="ClassName"... lazy="false">
then after executing HQL query the retrieved objects are not proxied by CGLIB
but if the <class name="ClassName" ... lazy="true"> then after the hql with 'fetch join' execution i get the instance of ClassName$EnhancerByCGLIB$121212
'join fetch' shouldn't use proxy, but id does. Of course it returns initialized proxy but the className is not the original name.
the problem with the CGLIB arises when you use the retrieved proxied object in reflection API operations (for instance, while building JDOM element)
Code:
org.jdom.IllegalNameException: The name "CaseLastEvent$$EnhancerByCGLIB$$168bdef7"
is not legal for JDOM/XML elements:
XML names cannot contain the character "$".
so the main buggish point i think is because if it returns initialized proxy then that means you cant emulate the lazy="false" at runtime.
Any suggestion?
Thanks