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

Поиск
Список
Период
Сортировка
От stagirus
Тема Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Дата
Msg-id 1285762010765-3005405.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Список pgsql-jdbc
Oliver:
>>* use a real boolean column in their schema (I mean, the data you're
representing IS a boolean value in this case, right?);
--- No, we already tried this path. Unfortunately boolean is not portable
column type among DB vendors. So, we ruled out this option.

or
* use setObject(column, value, Types.SMALLINT) instead of the implied
setBoolean() call when setting the column (this may be tricky to do
since you have a layer between you and the driver, but that's not really
the driver's fault..); or
---I am not sure if our application developers have this option. Hibernate
handles this for us. I am not pointing fingers. I am curious how other DBs
or JDBC drivers handle it so transparently.

* add a suitable implicit cast on the backend side from boolean ->
smallint (not sure if this works, haven't looked at the details)
-- we will look into it.

Do any of these work for you? The first suggestion seems to be the
simplest to me, since you really are storing a boolean, not a smallint,
and you have control over the DDL.
--Not yet, please.

--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Re-BUGS-Mapping-Hibernate-boolean-to-smallint-Postgresql-tp2855367p3005405.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

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

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