Have you try to specify a dbtype = 'bool' in the resultMap property ? -Gilles
On Mon, 31 Jan 2005 10:42:51 +0100, Pablo Lopez <[EMAIL PROTECTED]> wrote: > Hi everybody, > > I'm using iBatis under .NET and PostgreSQL (ODBC driver). I'm trying my > first mappings and I have a problem with the boolean datatype. > > Integer mapping is working okay, and I can query / insert objects > without any trouble, but the problem arises when one of the attributes > is a boolean (bool under .NET / bool under PostgreSQL). > > When I insert an object there is no problem, but when I query the > database to populate an object, the following exception arises: > > "Uncontrolled Exception: System.InvalidCastException: "Specified > conversion is not valid" (at > System.Data.Odbc.OdbcDataReader.GetBoolean(Int32 i) > > I don't know what the problem is, cause I'm using bool types under .Net > and under PostgreSQL. I also tried the bit type (in the documentation), > but it doesn't work. > > What annoys me is that insertions are correct, but queries are not. > > Thanks a lot, > > Pablo. > >