You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by "James, Justin" <ju...@intel.com> on 2006/04/12 00:09:12 UTC

.Net 1.1 Null Dates Issue

This is my first experience with ibatis and I am stuck on a problem with
null dates coming from an Oracle database and binding them result set to
a Ilist. If I bind a single record, I do not have any problems but when
I bind to the Ilist collection it gives a specified cast error.  Any
pointers on how to get around this issue would be greatly appreciated.

Thx
Justin



Re: .Net 1.1 Null Dates Issue

Posted by Gilles Bayon <ib...@gmail.com>.
You can also used the nullValue attribute on the property tag.

-Gilles


On 4/12/06, James, Justin <ju...@intel.com> wrote:
>
>  This is my first experience with ibatis and I am stuck on a problem with
> null dates coming from an Oracle database and binding them result set to a
> Ilist. If I bind a single record, I do not have any problems but when I bind
> to the Ilist collection it gives a specified cast error.  Any pointers on
> how to get around this issue would be greatly appreciated.
>
> Thx
> Justin
>
>
>

Re: .Net 1.1 Null Dates Issue

Posted by Ron Grabowski <ro...@yahoo.com>.
Try using this custom type handler that maps NULL columns to
DateTime.MinValue and vice-versa:

 http://www.mail-archive.com/user-cs@ibatis.apache.org/msg00636.html

--- "James, Justin" <ju...@intel.com> wrote:

> This is my first experience with ibatis and I am stuck on a problem
> with
> null dates coming from an Oracle database and binding them result set
> to
> a Ilist. If I bind a single record, I do not have any problems but
> when
> I bind to the Ilist collection it gives a specified cast error.  Any
> pointers on how to get around this issue would be greatly
> appreciated.
> 
> Thx
> Justin
> 
> 
>