Re: Hibernate and Postgres 8.3/8.4

Поиск
Список
Период
Сортировка
От Michael Bell
Тема Re: Hibernate and Postgres 8.3/8.4
Дата
Msg-id 292862.11477.qm@web43140.mail.sp1.yahoo.com
обсуждение исходный текст
Ответ на Re: Hibernate and Postgres 8.3/8.4  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
Aw jeez, ya nailed it. There was indeed a setString where there should be setShort. Dunno where my head was.

Thanks.



----- Original Message ----
From: Oliver Jowett <oliver@opencloud.com>
To: Michael Bell <mikebell90@yahoo.com>
Cc: pgsql-jdbc@postgresql.org
Sent: Saturday, August 22, 2009 12:23:11 AM
Subject: Re: [JDBC] Hibernate and Postgres 8.3/8.4

Michael Bell wrote:

> Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: smallint = character varying
>   Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
>   Position: 628

> The queries in question are all "correct" in that they use query.setXXX, where XXX is a "reasonable" thing like
String,Integer, Long.....nothing fancy... 

Well, from the exception, either Hibernate is doing setString() on a
parameter that is compared to a smallint, or it's doing setShort() on a
parameter that is compared to a varchar type.. so one of the two sides
is wrong.

-O






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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Hibernate and Postgres 8.3/8.4
Следующее
От: "Campbell, Lance"
Дата:
Сообщение: Display SQL from Java Prepared Statement