I am creating a web service with Jax-RS and GSON. Now, GSON can't convert HibernateProxy objects and I have some questions. I am having an API so that I can eager load and lazy load. When I want to eagerload I use Hibernate.initialize(...). However this does not seem to guarantee that a object is unproxied?
So where, when and how would you unproxy an object? And how do you deal with this when the object also may have releations to other objects that also need to be unproxied?