Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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

pgsql-bugs by date

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

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group