I'm glad you like ibator.

It sounds like the only way to force the default value is to not send the
column on the insert statement.  This would require a new ibator method -
like insertSelective (analgous to the current updateByXXXSelective
methods).  Its probably not too difficult to do - I'll take a look.

Jeff Butler

On Wed, Jul 23, 2008 at 10:03 AM, Robert Glover <[EMAIL PROTECTED]>
wrote:

>      Disclaimer:  I think Ibator is the greatest thing since bread. Ibator
> rocks!
>
>     A programmer who has taken over an Ibatis Ibator program I wrote, asked
> me about the behavior of an Ibator generated INSERT statement as regards a
> column that allows nulls but has a default value.  This developer would like
> to know how to make Ibator use the default value of the column when the
> INSERT occurs.
>
>    In looking at the INSERT statement which iBator generates, It looks to
> me that it sets the column to null when the property in the domain object
> does not have a value for that column.  Oracle subsequently does not insert
> the default value because, apparantly, setting the column to null seems to
> be considered an override of the default value.
>
>    Is there any value I can set the property in the domain object to, so
> that when I pass it to the Ibator Insert it will use the default value?
>
> Thank you in advance,
> a great iBator Fan,
> Robert
>
>
>

Reply via email to