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: SqlFunctionProjetion and the IIF sql function
PostPosted: Thu Oct 23, 2008 6:16 am 
Newbie

Joined: Tue Aug 26, 2008 7:25 am
Posts: 12
Hi,

I want to use a SqlFunctionProjection with the "IIF" registered function (I use the MsSql2000Dialect) but I can't figure it how.

The reason is that the IIS registered function uses the "Searched format" of the CASE function - "case when ?1 then ?2 else ?3 end". In this format the ?1 parameter must be an expression which evaluates to true or false. But the SqlFunctionProjection's constructor accepts only an array of IProjections as the function arguments:

public SqlFunctionProjection(string functionName, IType returnType, params IProjection[] args).

So, I can't pass an ICriterion as the first argument of the IIF function.

Anybody encountered this problem till now? Am I missing something here?
I know there is a ConditionalProjection I can use but if possible I'd rather prefer to use the SqlFunctionProjection.

Thanks,
Bogdan


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.