Using Yoga with Hibernate - skyscreamer/yoga GitHub Wiki

If you wish to expose CGLIB-enhanced classes (such as Hibernate-persisted classes) through Yoga, you will need to add one piece of configuration to ensure that Yoga gets clean reflection access to your model objects.

In the configuration of your ResultTraverser, you will need to inject a ClassFinderStrategy, as follows:

<bean id="resultTraverser" class="org.skyscreamer.yoga.mapper.ResultTraverser"
    p:classFinderStrategy-ref="hibernateClassFinder">
</bean>

<bean id="hibernateClassFinder" class="org.skyscreamer.yoga.demo.mapper.HibernateClassFinderStrategy" />

Of course, if you need to implement custom classloader instructions for the model objects in your application, you can create your own implementation of the ClassFinderStrategy interface, and inject it into your ResultTraverser.

⚠️ **GitHub.com Fallback** ⚠️