The parentheses are completely redundant in that query,

/G

On Tue, Nov 2, 2010 at 11:02 AM, Niclas Pehrsson <[email protected]> wrote:
> Hi doesn't NHibernate Linq support parentheses?
>
>    var articles = (from article in session.Query<Article>()
>                                where
>
> (article.Number.StartsWith("kalle") && article.UnitPrice > 10) ||
>                                    (article.Number.Contains("kalle")
> && article.UnitPrice < 10)
>                                select article).ToList();
>
> I'm missing the parentheses around the two statements?
>
> where  (article0_.Number like ('kalle' /* @p0 */
>                                 + '%'))
>       and article0_.UnitPrice > 10 /* @p1 */
>        or (article0_.Number like ('%'
>                                     + 'kalle' /* @p2 */
>                                     + '%'))
>           and article0_.UnitPrice < 10 /* @p3 */
>
> --
> 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.

Reply via email to