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

Поиск
Список
Период
Сортировка
От Samuel Gendler
Тема Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Дата
Msg-id AANLkTi=OgduBWb4XLo3bqUXJULNEvUKCAh54xhiEgOjU@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Список pgsql-jdbc
On Mon, Sep 27, 2010 at 1:43 PM, Oliver Jowett <oliver@opencloud.com> wrote:
I would suggest that the OP either:

* use a real boolean column in their schema (I mean, the data you're
representing IS a boolean value in this case, right?); 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
* add a suitable implicit cast on the backend side from boolean ->
smallint (not sure if this works, haven't looked at the details)


I would actually suggest running your problem past the hibernate community.  It seems unlikely that you're the first team to encounter this problem.  How do you have the property mapped in the hibernate mapping?  Is it possible that explicitly setting the hibernate type of the property in the mapping will solve your problem?


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

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