Richard, perhaps we should add some others common used methods, as extensions, directly in the trunk. For example there are someone related to HQL functions as : ToUpper(), ToLower(), Concat(..), Year(), Day() and so on
On Sun, May 1, 2011 at 5:48 AM, Richard Brown (gmail) < [email protected]> wrote: > > Hmm, what is this '.IsNull()' business? Extension methods on > object/string? > > Yes. > > > > Are all Restriction methods available this way, i.e. IsLike, IsBetween, > etc. > > The common ones are, but not all of them (at least, I don’t think so). > > Note, you can also write (avoiding all the nested Or restrictions): > > session.QueryOver<MyType>() > .Where(Restrictions.Disjunction() > .Add(Restrictions.On<MyType>(t => t.Field1).IsNull) > .Add(Restrictions.On<MyType>(t => t.Field2).IsNull) > .Add(Restrictions.On<MyType>(t => t.Field3).IsNull)); > > > > >Will this still work when using aliases? (i.e. 'JoinAlias'). > > Yes > > > > > ... is there any docs describing this stuff? > > Yes ... > > http://nhforge.org/doc/nh/en/index.html#queryqueryover-additionalrestrictions > ... but it looks like there’s nothing on the extensions. I’ll see about > adding some. > > > > *From:* Guido Tapia <[email protected]> > *Sent:* Saturday, April 30, 2011 5:25 AM > *To:* [email protected] > *Subject:* Re: [nhusers] Feature Request: Requests.On should take a params > ICriterion[] argument > Hmm, what is this '.IsNull()' business? Extension methods on > object/string? Are all Restriction methods available this way, i.e. IsLike, > IsBetween, etc. > > Will this still work when using aliases? (i.e. 'JoinAlias'). > > Thanks for this info Fabio, looks interesting, is there any docs describing > this stuff? > -- > 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. > > -- > 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. > -- 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.
