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

Поиск
Список
Период
Сортировка
От Jeff Hubbach
Тема Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Дата
Msg-id 0FEDB42A-1C93-411C-853B-6CC27A4FBE44@cha.com
обсуждение исходный текст
Ответ на Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)  (stagirus <mamasa@stagirus.com>)
Ответы Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Список pgsql-jdbc
I found this post in Hibernate's forums:

https://forum.hibernate.org/viewtopic.php?f=1&t=944165&p=2247802&hilit=postgres+boolean+smallint#p2247802

In summary, Hibernate will handle converting a char(1) in the database to/from boolean in java, and from that post, it
worksin DB2 and PostgreSQL. 

So here's another option. Change your smallint in the database to a char(1). The only thing it affects is the DDL for
eachdatabase, any existing data you have in the database, and the Hibernate mapping files. Your java code remains
untouched.

-- Jeff Hubbach

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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Следующее
От: Boris Partensky
Дата:
Сообщение: Re: Upgrading JDBC driver from 7.3 to 8.4 affected execution plans