-->
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: using case expression in hql
PostPosted: Mon May 07, 2007 1:22 pm 
Newbie

Joined: Thu Jan 04, 2007 1:36 pm
Posts: 16
Hi,
Im trying to use a case expression within the HQL and when I use a trivial "case when ... then ... end", it works ok, but as soon as i add the "else" part, it fails with unexpected AST node: query error. I've even tried with the latest hibernate jar, but of no use. Any ideas on how to fix this? The same works when used via SQLQuery.
FYI: Im using another select within the "else" condition.
ex: case when parent.name is not null
then parent.name
else
select child.name where child.parentId = parent.id
end

Any help is appreciated.


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.