You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Julio Barros <Ju...@E-String.com> on 2003/04/17 06:05:10 UTC

Postgresql, bit and boolean mapping

Hi,

I recently switched from mysql to postgresql on one of my projects and 
I cant quite figure out the right way to map a java boolean field to a 
postgres column.  I've tried bit and specifying bit in the mapping but 
it complains about the boolean-bit mismatch.  When I specify boolean in 
the mapping it says it does not understand boolean and to only use 
types in java.sql.types but boolean is in java.sql.types.

Can someone provide some insight?  Thanks.

Julio


Re: Postgresql, bit and boolean mapping

Posted by Andrew Geery <ge...@doc.state.sc.us>.
I don't have any experience with postgres bit columns, but you may be 
able to work around the problem by using a subclass of FieldConversion:

http://db.apache.org/ojb/jdbc-types.html

Hope that helps
Andrew

Julio Barros wrote:

> Hi,
>
> I recently switched from mysql to postgresql on one of my projects and 
> I cant quite figure out the right way to map a java boolean field to a 
> postgres column.  I've tried bit and specifying bit in the mapping but 
> it complains about the boolean-bit mismatch.  When I specify boolean 
> in the mapping it says it does not understand boolean and to only use 
> types in java.sql.types but boolean is in java.sql.types.
>
> Can someone provide some insight?  Thanks.
>
> Julio
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>