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

Re: Mapping Hibernate boolean to smallint(Postgresql)

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: stagirus <mamasa(at)stagirus(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Mapping Hibernate boolean to smallint(Postgresql)
Date: 2010-09-25 06:58:34
Message-ID: AANLkTi=QK==bmA9CMFztrXMT=1YEYB06YezzckKcS+7k@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
>> Now comes the "religious" discussion. The above design works well for
>> Oracle, DB2 and MySQL, etc. But PostgresQL seems to choke. It complains
>> about the data type mismatch. By reading various discussions on your
>> forum,
>> there seems to some issues with the data type mapping at the JDBC driver.
>> JDBC driver does not convert boolean value (false/true) to integers (0/1).
>

There isn't really enough information here to diagnose the problem,
but here's another guess - if it's just a problem with HQL generated
queries, perhaps you could try adding the following to your Hibernate
configuration:

<property name="hibernate.query.substitutions">true 1, false 0</property>

Regards,
Dean

In response to

Responses

pgsql-bugs by date

Next:From: r dDate: 2010-09-25 10:21:39
Subject: Postgres 9 Installation problems
Previous:From: Craig RingerDate: 2010-09-25 06:48:34
Subject: Re: BUG #5661: The character encoding in logfile is confusing.

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