pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: stagirus <mamasa@stagirus.com>
To: pgsql-bugs@postgresql.org
Subject: Re: Mapping Hibernate boolean to smallint(Postgresql)
Date: Fri, 24 Sep 2010 15:13:59 -0700 (PDT)
Message-ID: <1285366439070-2853322.post@n5.nabble.com> (raw)
In-Reply-To: <4C9CD5FD0200002500035D22@gw.wicourts.gov>
References: <1285364037415-2853280.post@n5.nabble.com>
	<4C9CD5FD0200002500035D22@gw.wicourts.gov>


Thank you for your quick response. As I stated above, we directly do not call
any JDBC API, not any more. It is all done by Hibernate OR mapping. The
above solution (Hibernate mapping) worked fine with Oracle JDBC drivers, for
a long time. I believe Hibernate might be mapping, or calling the
appropriate JDBC API, for boolean fields. I guess it would be set/getBoolean
methods, right?

If I were to guess, Oracle JDBC driver happily takes Java true/false as
boolean values and maps to integer columns (0 or 1). Whereas PostgresQL
might be expecting 'f' or 't' for boolean values for obvious reasons. My
impression is it is the way PostgresQL (JDBC) team views the boolean values
should function. As all other religions - it is just a matter of
perspective. We are just your users, BTW, the users perspective is very
helpful it not powerful.

Am I making sense? If you need, I will get the exception report from my
developer. 

Thank you again.
 


-- 
View this message in context: http://postgresql.1045698.n5.nabble.com/Mapping-Hibernate-boolean-to-smallint-Postgresql-tp2853280p2...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.



view thread (53+ messages)  latest in thread

Message-ID: <1285366439070-2853322.post@n5.nabble.com>
Permalink:  ../1285366439070-2853322.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1285366439070-2853322.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: mamasa@stagirus.com
  Subject: Re: Mapping Hibernate boolean to smallint(Postgresql)
  In-Reply-To: <1285366439070-2853322.post@n5.nabble.com>
  References: <1285364037415-2853280.post@n5.nabble.com> <4C9CD5FD0200002500035D22@gw.wicourts.gov> <1285366439070-2853322.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox