Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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

pgsql-bugs by date

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

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group