-->
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: Initialize collections using AliasToBeanResultTransformer
PostPosted: Wed Mar 12, 2008 8:18 am 
Newbie

Joined: Fri Nov 17, 2006 9:40 am
Posts: 11
Location: Switzerland
Hi

I'm running a HQL query and using an AliasToBeanResultTransformer to create bean instances. Child collections are not initialized by that transformer, I believe this is "as designed".

If, however, I do need initialized collections, what should I do?

Reloading (session.refresh()) each object seems stupid, as I've just accessed all required data using the query, so running a SELECT for each object in the result list shouldn't be necessary.

Can I make Hibernate turn my empty HashSet into a PersistentSet, or can should I subclass the AliasToBeanResultTransformer (if so, how?). After RTFM and googling for too long, I still haven't found any hints.

Any help appreciated!
Thanks

Simon Niederberger
Switzerland


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 12, 2008 8:22 am 
Newbie

Joined: Fri Nov 17, 2006 9:40 am
Posts: 11
Location: Switzerland
Sorry about the double post, my browser hung up while posting.

Simon


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.