-->
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.  [ 1 post ] 
Author Message
 Post subject: limiting the number of columns returned from an entity
PostPosted: Thu Jan 18, 2007 1:04 am 
Newbie

Joined: Thu Jan 18, 2007 12:55 am
Posts: 10
I have table called committee
which has 10 fields

By using projections on criteria queries it is possible to limit the columns returned

but is it possible to do this using HQL. what i meain I don't want to specify the field names
like one below

from cmte.id, cmte.name committe cmte

by just issuing query like
"from cmte" , I would like certain fields that will be returned by this query not all the columns.
Is it possible to cofigure somewhere, I want only 2 or 3 fields returned
can I specify somewhere in a hbm file for that.
The reason is when I am fetching an assosciation I don't want to retrieve all the unwanted columns, just the selected ones

Thanks


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

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.