Dear All,
I am using Nhibernate Criteria and Projections to retrieve data. But when using the Projections.Conditional statement the parameter order gets messed up. The same scenario occurs when using Projections.SqlFunction .
The generated query after execution is as follows.
SELECT this_.PageControlMappingId as y0_, this_.PageId as y1_, this_.ControlSection as y2_, privilegei1_.PrivilegeId as y3_, privilegei1_.PrivilegeName as y4_, this_.ControlProperty as y5_, (case when this_.PrivilegeId in (@p0, @p1, @p2) then @p3 else @p4 end) as y6_ FROM PMO_tblSecPageControlMapping this_ inner join PMO_tblSecPrivileges privilegei1_ on this_.PrivilegeId=privilegei1_.PrivilegeId WHERE this_.PageId = @p5; @p0 = 'ActivityMaster', @p1 = '1', @p2 = '2', @p3 = '3', @p4 = '1', @p5 = '0'
It replaces the parameter p0 in the place of p5. Actually this_.PageId need to be 'ActivityMaster'.
Is this a bug ? Provide me your valuable suggestions ASAP.
Thanks in Advance Arun
|