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

From stagirus
Subject Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Date
Msg-id 1285607332343-2855614.post@n5.nabble.com
Whole thread Raw
In response to Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-jdbc
Kevin's response above seems to be very promising.
From your comments/observations, are you saying that there could be some
coding issues regarding these conversions between boolean and integers?

Reg your question of "What kinds of values do you see in the SMALLINT column
when you set a TRUE into a SMALLINT column?  1?  -1?"
: Nothing. Because it fails before any inserts or updates happen. We
discussed the error above.

Because I have not worked with the internals of Hibernate/JDBC drivers, I
cannot definitively state if Hibernate is calling setters and getters
(setBoolean) using prepared statements or directly executes INSERT/UPDATE
statements. Anything is possible.

Thanks.
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Re-BUGS-Mapping-Hibernate-boolean-to-smallint-Postgresql-tp2855367p2855614.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

pgsql-jdbc by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Next
From: "Kevin Grittner"
Date:
Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)