ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: confused about storing image data in my database
Date Mon, 07 Nov 2005 23:03:45 GMT
I checked the postgres driver (I did not find a useful map on the
website), the methods getBytes() and setBytes() are ported directly to
the native bytea-datatype.

I think it works out-of-the-box :)


-----Original Message-----
From: Alan Chandler [mailto:alan@chandlerfamily.org.uk] 
Sent: maandag 7 november 2005 23:28
To: user-java@ibatis.apache.org
Subject: Re: confused about storing image data in my database

On Monday 07 Nov 2005 20:56, Jeff Butler wrote:
> For BLOBs, the property in your bean should be of type byte[]. In the
> result map you may, or may not, need to specify jdbcType="BLOB" - it's
> dependant on the driver (e.g. with DB2 it does not matter).
>  I'm not familiar with OID - the byte[] and BLOB might work. If not,
> try a property of type Object and cast it yourself to the proper type.
>  All else fails, use a custom type handler. But I think the byte[] and
> combination works in most cases.

I think you misunderstand me.  I don't want to use the BLOB type.  The 
question I am asking is how does the "bytea" type in Postgres map onto
types, and further, whatever that type is (and I think it isn't BLOB)
does that map on to a byte array in ibatis

Alan Chandler
Open Source. It's the difference between trust and antitrust.

View raw message