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: Load only some fields from a collection
PostPosted: Wed Jan 05, 2011 2:59 am 
Newbie

Joined: Wed May 06, 2009 6:43 am
Posts: 5
Hi all,
I have the following question. I have an entity "Bug" that has a collection of "Bug" inside (these are the bugs related to the first one). This object is quite big and because of Web Services use I cannot use lazy loading and also this relation causes a cycle in the object graph (a big problem for CXF web services marshalling). What I want is to maintain the relation on the database between objects (e.g. foreign key), expecially for searches with criteria. Is it possible to define a query that in the loading phase only loads specific fields (e.g. identifier). I've seen the Loader tag that can be defined in the hbm...is it the correct way to do this?
Thanks for your help.


Top
 Profile  
 
 Post subject: Re: Load only some fields from a collection
PostPosted: Wed Jan 05, 2011 6:17 am 
Newbie

Joined: Wed May 06, 2009 6:43 am
Posts: 5
I tried to solve this problem with a native query but it's impossible to fetch only some columns from the resultset (http://opensource.atlassian.com/project ... e/HHH-3035). Is there any workaround to do this?


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.