Re: smallint vs. boolean (was invalid string enlargement

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: smallint vs. boolean (was invalid string enlargement
Дата
Msg-id 425C4733.7060107@opencloud.com
обсуждение исходный текст
Ответ на Re: smallint vs. boolean (was invalid string enlargement  (Glenn Holmer <gholmer@weycogroup.com>)
Ответы Re: smallint vs. boolean (was invalid string enlargement  (Glenn Holmer <gholmer@weycogroup.com>)
Список pgsql-jdbc
Glenn Holmer wrote:
> On Fri, 2005-03-18 at 09:37 +1300, Oliver Jowett wrote:

>>This behaviour is unlikely to change, so you might want to look at
>>tracking down the cause. As a last resort, you might be able to create
>>implicit casts between smallint<->boolean.
>
>
> Yes, the database has some fields defined as smallint and set to 0 for
> false or either 1 for true; the Hibernate DTOs have these fields
> declared as boolean.
>
> Is there any way around this without rewriting everything?

Change the column type so it is a boolean, change the hibernate mapping
so it calls setShort(), or create the implicit cast as I suggested.

-O

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

Предыдущее
От: Vernon
Дата:
Сообщение: Data type for array of byte
Следующее
От: "Nico"
Дата:
Сообщение: waiting during transaction