nhibernate - How to use bitwise operators in HQL? -
In HQL, how can I use bitwise operators?
Select RoleId, RoleName, RolePerms WHERE (RolePerms and @Parameter) = @Parameter
But, writing this HQL
< Choose from pre> role where (rollprom and param) =: param
gives me this error: NHibernate.Hql Ast.antLR.QuerySyntaxException: 'Antlr The exception of type 'Runtime.NoViableAltException' was thrown.
I got a solution to this: HLL works like this:
Select from role r where r.Permissions & param: & gt; 0
Comments
Post a Comment