Is there an API call that will return an instance of an entity class given an initialized proxy? Preferably one that will be efficient for a collection of proxies?
The problem I'm trying to solve is that I need to do XML marshalling of entity objects, and I need to have control over how much of the graph appears in the result. The XMLDatabinder that comes with Hibernate works pretty well, but I also need something that will marshal "computed" properties that are not present in the Hibernate mapping file.
On the advice of other posts in this forum, I'm looking into Castor, but its output looks messy if the objects are Hibernate proxies, and short of disabling lazy-loading at the Configuration/SessionFactory level, I haven't seen a solution.
Thanks.
|