I've looked in the latest beta release, 2.1, and the method that best matched Subquery in the Projection namespace was SubqueryProjection. Which alternative method can i use?
On 22 Jun., 11:05, Tuna Toksoz <[email protected]> wrote: > 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_toksozhttp://tunatoksoz.comhttp://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))); <---- Skjul > > tekst i anførselstegn - > > - Vis tekst i anførselstegn - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
