Check out http://ayende.com/Blog/archive/2006/10/28/QueryingCollectionsInNHibernate.aspx. It demonstrates EXISTS sub-queries nicely, through HQL and through criteria.
Cheers, John On Aug 6, 1:01 pm, Marvin Massih <marvin.mas...@googlemail.com> wrote: > On 6 Aug., 13:27, Jakob Tikjøb Andersen <j...@miracleas.dk> wrote: > > > Which database are we talking about? Doesn't it support LIMIT or something > > similar? > > Gupta/Unify SQLBase. We're moving to MSSQL, but the program should > still run on the old DBMS. > > > Depending on that selecting a constant would still force you to go through > > all rows to get the correct amount so a count would probarbly be as > > effective > > Selecting a constant would be easier to write. > The queries I'm talking about come from configuration entries in the > database, it would be nice if I could simply prefix the "from Class > c ..." queries with a "select 1", then the configuration entries would > be shorter and less prone to mistakes. > > Marvin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---