Expert |
|
Joined: Fri Jan 30, 2009 1:47 am Posts: 292 Location: Bangalore, India
|
Can you make your ques a bit clearer. May be with an eg.
Do you mean that:
"select prop1, prop2 from ClassA where prop3=:someValue" is your query
and you want this HQL to return an object contatining prop1 and prop2 instead.
In that case you can write the HQL as:
select new TempObject(prop1, prop2) from ClassA where prop3=:someValue
Make sure TempObject class has a matching a constructor. There is no need for mapping the TempObject class.
_________________ Regards, Litty Preeth
|
|