Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)

From: stagirus <mamasa(at)stagirus(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Date: 2010-09-27 15:35:21
Message-ID: 1285601721239-2855475.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs 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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Grittner 2010-09-27 16:30:35 Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Previous Message Llewellyn, Mark (ADP DSI) 2010-09-27 15:27:03 Re: BUG #5650: Postgres service showing as stopped when in fact it is running

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kevin Grittner 2010-09-27 16:30:35 Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Previous Message Kevin Grittner 2010-09-27 14:32:37 Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)