Re: Mapping Hibernate boolean to smallint(Postgresql)

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: Mapping Hibernate boolean to smallint(Postgresql)
Дата
Msg-id AANLkTi=QK==bmA9CMFztrXMT=1YEYB06YezzckKcS+7k@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Mapping Hibernate boolean to smallint(Postgresql)  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: Mapping Hibernate boolean to smallint(Postgresql)  (stagirus <mamasa@stagirus.com>)
Список 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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Mapping Hibernate boolean to smallint(Postgresql)
Следующее
От: r d
Дата:
Сообщение: Postgres 9 Installation problems