If you raise a JIRA and assign it to me I'll take a look.

(Not sure if it will need a custom extension to handle it).

-----Original Message----- From: Luka
Sent: Tuesday, May 17, 2011 3:54 PM
To: nhusers
Subject: [nhusers] Re: Bitwise comparison in QueryOver

Yes, this works,.
Thanks

We need to Find a simpler way of doing it.

Fabio Maulo, can you help? Please

:-)


On May 9, 6:13 pm, Chris Sano <[email protected]> wrote:
Hey Luka,

Try something along those lines:

.Where(Expression.Gt(Projections.SqlProjection(String.Format("({{alias}}.Ac cessMask
& {0}) as AccessMask", (int)AccessMask.Read), null, null), 0))

If anyone has a simpler way of writing the above expression, I'd love to
hear it.

Let me know how that works for you.
-cs







On Mon, May 9, 2011 at 4:46 AM, Luka <[email protected]> wrote:
> Hi,
> How to do Bitwise comparison in QueryOver queries?

> ie how to do this query in queryover
> var query = from t in Session.Query<Ticket>()
>                        from ticketUser in t.TicketUsers
>                        from usersTicketAccess in
> t.UsersTicketAccess
>                        join user in Session.Query<User>() on
> ticketUser.User.Id equals user.Id
>                        where user.Id == parameters.UserId
>                              && (usersTicketAccess.AccessMask &
> AccessMask.Read) > 0
>                        select t;

> please help.

> --
> 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.

--
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