Re: Mapping Hibernate boolean to smallint(Postgresql)

From: stagirus <mamasa(at)stagirus(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Mapping Hibernate boolean to smallint(Postgresql)
Date: 2010-09-24 22:13:59
Message-ID: 1285366439070-2853322.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


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-tp2853280p2853322.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Grittner 2010-09-25 02:28:30 Re: Mapping Hibernate boolean to smallint(Postgresql)
Previous Message Kevin Grittner 2010-09-24 21:46:53 Re: Mapping Hibernate boolean to smallint(Postgresql)