Hello
is it possible with hibernate Criteria to return fields from more than one object....? something like this: .createQuery("select new map( b as bill, c as client, (SELECT sum((i.itemprice * rs.quantity) .......... ) FROM rstavka rs, item i WHERE .... URDER BY r.billno desc")... etc
If yes, could someone show me some example??? I need to be able to users to make cynamic queries to db, and get the fields from different objects. I understand that aim of ORM is to work with one class at time, but i need advice what is the best way to deal with requirements as this one.
Help appreciated, still new with hibernate
thank you.
|