Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: stagirus <mamasa(at)stagirus(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Date: 2010-09-29 13:02:48
Message-ID: 4CA338F8.80902@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2010-09-29 13:45:15 Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session
Previous Message Craig Ringer 2010-09-29 12:13:20 Re: BUG #5682: Postgres Service crashes with exception 0xC0000135

Browse pgsql-jdbc by date

  From Date Subject
Next Message Craig Ringer 2010-09-29 13:57:28 Re: Loading a dump containing include commands
Previous Message John Lister 2010-09-29 12:59:27 selecting using array as IN condition parameter - possible?