In other words, use HQL for mental health... 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, Aug 9, 2009 at 2:08 AM, Fabio Maulo <[email protected]> wrote: > In HQL isfrom Order T where T.Customer.Country = 'China' > and T.Customer.Orders.count > 1 > > 2009/8/7 rg <[email protected]> > >> >> Hi, I'm trying to use the Criteria api to query the database and have >> no problem with basic queries involving only 'root level' properties, >> that is direct attributes of the entity I'm querying for. But how to >> specify predicates on related entity attributes? >> For example: select all Orders where Customer is from China and has >> placed more than one order so far: >> >> select Order T where T.Customer.Country = 'China' and >> T.Customer.Orders.Count > 1 >> >> can you translate it into the criteria API? >> >> R >> >> > > > -- > Fabio Maulo > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
