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

Поиск
Список
Период
Сортировка
От stagirus
Тема Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Дата
Msg-id 1285601721239-2855475.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Список 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.

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)