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
|