-->
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.  [ 6 posts ] 
Author Message
 Post subject: Boolean to int save to sybase
PostPosted: Mon Jun 18, 2007 6:01 pm 
Newbie

Joined: Wed May 16, 2007 6:43 pm
Posts: 5
Hi,

I am trying to save java.lang.Boolean to int datatype in sybase which is nullable using hibernate. if the Boolean object is null hibernate converts to 0 and save is it. Is there any way to make Boolean object null save as null to db?

I will agree if it hibernate handle this way for primitive data type boolean, But for object Boolean it should have handled the same as it does for Integer. int in java doesn't allow null the same of primitive boolean and it handles Integer to proper conversion if its null it save null to database and I think the same should be handled for java.lang.Boolean.

Hibernate version 3

Thanks,
Hemen


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 19, 2007 2:56 am 
Senior
Senior

Joined: Thu May 17, 2007 2:31 am
Posts: 194
Location: Sri Lanka
Hi

try this

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

Amila

(Don't forget to rate if helps)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 19, 2007 6:51 am 
Newbie

Joined: Wed May 16, 2007 6:43 pm
Posts: 5
amila733 wrote:
Hi

try this

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

Amila

(Don't forget to rate if helps)


Thanks. Will try this and let you know.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 19, 2007 6:51 am 
Newbie

Joined: Wed May 16, 2007 6:43 pm
Posts: 5
amila733 wrote:
Hi

try this

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

Amila

(Don't forget to rate if helps)


Thanks. Will try this and let you know.


Top
 Profile  
 
 Post subject: will try
PostPosted: Tue Jun 19, 2007 6:52 am 
Newbie

Joined: Wed May 16, 2007 6:43 pm
Posts: 5
amila733 wrote:
Hi

try this

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

Amila

(Don't forget to rate if helps)


Thanks. Will try this and let you know.


Top
 Profile  
 
 Post subject: will try
PostPosted: Tue Jun 19, 2007 6:52 am 
Newbie

Joined: Wed May 16, 2007 6:43 pm
Posts: 5
amila733 wrote:
Hi

try this

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

Amila

(Don't forget to rate if helps)


Thanks. Will try this and let you know.


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