Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql) - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Date
Msg-id 4CA338F8.80902@opencloud.com
Whole thread Raw
In response to Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)  (stagirus <mamasa@stagirus.com>)
Responses Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
List pgsql-jdbc
stagirus wrote:
> Oliver:
>>> * use a real boolean column in their schema (I mean, the data you're
> representing IS a boolean value in this case, right?);
> --- No, we already tried this path. Unfortunately boolean is not portable
> column type among DB vendors. So, we ruled out this option.

You can't ship different DDL for different vendors?

I thought part of the point of using a mapping layer like Hibernate was
so Hibernate could handle the details of the mapping to different DBs
(which might be done in different ways) without having to know about the
different mappings in your application. So a Java boolean might be
mapped to either a Postgresql boolean or an Oracle SMALLINT (since
oracle doesn't have a real boolean type?), but your app code doesn't
care about that detail - it's just dealing with a Java boolean either way.

-O

pgsql-jdbc by date:

Previous
From: stagirus
Date:
Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Next
From: "John Lister"
Date:
Subject: selecting using array as IN condition parameter - possible?