I can help you to convert this into Criteria but not sure how it can be done in hql.
Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Sun, Jun 21, 2009 at 1:38 PM, Smsgo <[email protected]> wrote: > > Can somebody help me figure out how to express this SQL in HQL? > > The problem is of cause how to convert the ORDER BY clause. > > SELECT T.* FROM Test T > ORDER BY ( > SELECT COUNT(TAR.TestId) > FROM Test2 TAR > WHERE T.Id = TAR.testId > AND TAR.datetime > (getDate() - 1) > ) > DESC > > Thanks in advance > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
