-->
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.  [ 2 posts ] 
Author Message
 Post subject: Query substitutions not working
PostPosted: Tue Jan 13, 2009 5:15 am 
Newbie

Joined: Tue Jan 13, 2009 5:03 am
Posts: 1
Hi all.

I am using hibernate + derby.

I put

<property name="query.substitutions">true 1, false 0</property>

In configuration file for substituting short to boolean.

I am getting error like ,

ERROR BasicPropertyAccessor: - expected type: java.lang.Boolean, actual value: java.lang.Short

I tried with changing config to

<property name="hibernate.query.substitutions">true 1, false 0</property>

and even tried giving this property runtime as,

props.put("hibernate.query.substitutions", "true 1, false 0");

Nothing helps. I tried hibernate 3.3.1(latest) and 3.1 versions with no help.

How to fix this? Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 23, 2009 6:35 pm 
Newbie

Joined: Wed Oct 25, 2006 11:16 am
Posts: 1
Same problem here...
I use Oracle 8i
Hibernate 3.2.6

Code:
<property name="hibernate.query.substitutions">true 'Y', false 'N'</property>


Then i got this error:

Code:
ava.sql.BatchUpdateException: ORA-02290: check constraint (MYSCHEMA.CK_RESP_FIELD_MANDATORY) violated


When i disable the constraint, hibernate inserts 1 or 0 on that field...

Here's a hbm's snippet:
Code:
<property name="mandatory" type="boolean" generated="never">
         <column length="1" name="MANDATORY" not-null="true"/>
     </property>


I also tried with: hibernate.query.substitutions=true='Y', false='N' and nothing seems to work...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.