But you can patch your version, or you ccan wait a bit so that you'll get 2.1 GA...
Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Mon, Jun 22, 2009 at 12:00 PM, Smsgo <[email protected]> wrote: > > I'm using NHibernate-2.0.1.GA so I've made some adjustments to your > solution. > Unfortunly SubQuery isn't in my Projections namespace. Has the method > been moved? > > ISession session = NHibernateSessionManager.Instance.GetSession > (); > > DetachedCriteria detac=DetachedCriteria.For<Test2>("TAR") > .Add(Restrictions.EqProperty("TAR.TestId","T.Id")) > .Add(Restrictions.EqProperty > ("TAR.datetime",Projections.SqlProjection("getdate()-1", > new []{"Ddate"}, > new []{NHibernateUtil.GuessType(typeof(DateTime))})) > ) > .SetProjection(Projections.Count("TestId")); > > ICriteria crit = session.CreateCriteria(typeof(Test2),"T"); > crit.AddOrder(Order.Desc(Projections.SubQuery(detac))); <--- > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
