-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Proxies and XML marshalling
PostPosted: Thu Jan 27, 2005 2:26 pm 
Regular
Regular

Joined: Thu Oct 07, 2004 4:45 pm
Posts: 92
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 28, 2005 1:54 pm 
Regular
Regular

Joined: Thu Oct 07, 2004 4:45 pm
Posts: 92
Well, for what it's worth, I solved the problem by enhancing the XmlDatabinder to marshal unmapped (i.e. derived) properties via introspection. Works like a charm.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.