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: Translate HQL to Criteria
PostPosted: Wed Jun 20, 2007 7:27 am 
Newbie

Joined: Wed Jun 20, 2007 7:20 am
Posts: 5
Hi I am doing a complex search following the example of Ayende's Blog at this address

http://www.ayende.com/Blog/archive/2006/12/07/7055.aspx

Unfurtunately I couldn't find how to sum the multiplication of 2 columns with Criteria.
My HQL (just an abstract) is

select distinct c
from Customer c
where
(
select sum(d1.UnitPrice*d1.Quantity)
from Customer c1
join c1.Orders o1
join o1.Detail d1
where o1.Customer.Id = c.Id
) > 10000

How can I translate the above HQL it to Criteria?

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.