Hibernate + setObject() + boolean problem with a patch

From: Kalle Kivimaa <kalle(dot)kivimaa(at)iki(dot)fi>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Hibernate + setObject() + boolean problem with a patch
Date: 2005-02-18 10:39:19
Message-ID: 87psyy884o.fsf@kaylee.killeri.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

We are using Hibernate on top of PostgreSQL and with a recent switch
to PostgreSQL 8.0 we ran into a problem that trying to insert rows
with null boolean fields to the DB failed miserably. I traced the
problem to the fact that Hibernate wants to do this throuhg
setObject() and this does not handle null booleans. The attached patch
handles the booleans the same way as bits are handled which I think is
the correct way (at least it solved our problem).

--
* Sufficiently advanced magic is indistinguishable from technology (T.P) *
* PGP public key available @ http://www.iki.fi/killer *

Attachment Content-Type Size
setobject.patch text/x-patch 658 bytes

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Matt Magoffin 2005-02-18 17:41:17 Statement setNull for Types.CLOB
Previous Message Oliver Jowett 2005-02-17 19:38:22 Re: JDBC driver