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 1285601721239-2855475.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>)
List pgsql-jdbc
My developer sent me the following error report. It does not include stack
trace. But I can get it shortly.

 ERROR: column "deleted" is of type smallint but expression is of type
boolean

It appears that the queries generated by Hibernate contains boolean
expressions that are not being accepted as valid values by Postgresql DB.
Does anybody have experience with the following Hibernate's query
substitutions will work (Dean's suggestion)?
<property name="hibernate.query.substitutions">true 1, false 0</property>

It seems to be promising but I want to be sure it works before I recommend
to my team. They are already burnt with this boolean related issues in
Postgresql.

Ideally DB Engine/JDBC Drivers should be flexible(smart?) enough to
recognize integer values for boolean values. It is unfortunate that RDMBS
vendors nor ANSI SQL standardized boolean values. Am I making sense?

Thanks.
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Re-BUGS-Mapping-Hibernate-boolean-to-smallint-Postgresql-tp2855367p2855475.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)