-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Parameter order issue with Projections.Conditional stmnt
PostPosted: Mon Jul 06, 2009 2:19 am 
Newbie

Joined: Mon Jul 06, 2009 1:54 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.