-->
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: Hibernate criteria to return more objects
PostPosted: Tue Jan 25, 2011 1:22 am 
Newbie

Joined: Fri Jan 21, 2011 1:20 pm
Posts: 2
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.


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.