-->
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: Dynamic-insert =true
PostPosted: Thu Jun 04, 2009 8:34 am 
Newbie

Joined: Thu Jun 04, 2009 8:11 am
Posts: 1
Hi,
In <class> element if we add the dynamic-insert="true" then it will insert the values which is having data(i.e is not null). I have doubt on the insertion. If we r not setting the data to text or varchar field then the default value will be null so dynamic-insert will not insert those fields. But if the field is integer type and not setting the value then the default value will be 0. In this scenario dynamic-true is considering 0 as value and trying to insert it . If the value is 0 the filed should not be inserted.
How to achieve this scenario.

Thanks,
jai


Top
 Profile  
 
 Post subject: Re: Dynamic-insert =true
PostPosted: Thu Jun 04, 2009 8:48 am 
Regular
Regular

Joined: Fri May 12, 2006 4:05 am
Posts: 106
Hi,

since there is no such thing as a null int-field, the only way i can think of to achieve the behaviour you are trying to get is changing the fields type to Integer to get a chance to distinguish null and 0.


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.