Some times when we access domain objects of collections in one to many or many to many relationships, we get Hibernate class wrapped with javassist, basically hibernate wraps all loaded objects with javassist after loading(lazy loading case) them .
So if we call
class.name on the members of collections in one to many or many to many relationships we would get class names something like
So to solve this issue, hibernate provides a
HibernateProxyHelper class that has a static method to return the class without the wrapped javassist .
This method returns the class without the javassist proxy of hibernate class. If the
wrappedClassObject is not proxied by javassist the original class will be returned. 🙂