-->
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.  [ 4 posts ] 
Author Message
 Post subject: formula attribute does not work on case function
PostPosted: Sat Apr 24, 2004 12:37 am 
Newbie

Joined: Sat Apr 24, 2004 12:30 am
Posts: 6
The following hibernate mapping does not seem to work:

<property name="hasEmployeeConstraint"
formula="(SELECT CASE WHEN employee_facility_constraint = 0 THEN 1 ELSE 0 END)"

/>

The mapping converts to the sql below:

SELECT CASE WHEN readhocpag0_.employee_facility_constraint = 0 readhocpag0_.THEN 1 ELSE 0 END as f2_1_,


There is an extra table alias (readhocpag0_ ) that gets inserted in between "0" and "THEN".

I am running on version 2.1.3.

Please let me know if this is a limitation.

thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 24, 2004 12:41 am 
Newbie

Joined: Sat Apr 24, 2004 12:30 am
Posts: 6
By the way, I am using Microsoft SQL Server.

-- benjie


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 24, 2004 12:44 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
oops, I already fixed this in v22branch, but forgot to replicate the fix back to 2.1 branch. committing that change now.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 26, 2004 11:13 am 
Newbie

Joined: Sat Apr 24, 2004 12:30 am
Posts: 6
got the latest version of 2.1.3 and it worked. Thank you very much for your quick response/action. I really appeciate it.

benjie


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

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.