Re: Problems with Hibernate Discriminators and 9.0-801.jdbc4

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Problems with Hibernate Discriminators and 9.0-801.jdbc4
Дата
Msg-id AANLkTi=muHS+5uUaOoc-6EtNoMBWe39kotKxNTSXKqt-@mail.gmail.com
обсуждение исходный текст
Ответ на Problems with Hibernate Discriminators and 9.0-801.jdbc4  (sdavidr <david.ricoma@gmail.com>)
Ответы Re: Problems with Hibernate Discriminators and 9.0-801.jdbc4  (sdavidr <david.ricoma@gmail.com>)
Список pgsql-jdbc
On Wed, Mar 23, 2011 at 7:35 PM, sdavidr <david.ricoma@gmail.com> wrote:
> Hi,
>
> I have a problem with Hibernate's "single tables"  and the last postgres
> jdbc driver. It seems that now it includes a returning * when there is an
> Insert, instead of a returning [identifier] that seems more cleaner and
> doesn't return all the fields. There is a reason for that? and there
> expectatives to change that?
>
> Because of the "returning *", crash when there is an Insert in a table with
> a String type discriminator, returning this :
>
>  Caused by: org.postgresql.util.PSQLException: Bad value for type long :
> NACIONAL
>        at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.toLong(AbstractJdbc2ResultSet.java:2796)
>        at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.getLong(AbstractJdbc2ResultSet.java:2019)
>        at
> org.hibernate.id.IdentifierGeneratorHelper.get(IdentifierGeneratorHelper.java:114)
>        at
> org.hibernate.id.IdentifierGeneratorHelper.getGeneratedIdentity(IdentifierGeneratorHelper.java:86)
>        at
> org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:98)
>        at
> org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)
>
> Thanks for any feedback!

I just had a look at the 8.4 driver and it returns * as well. Can you
give us a concrete example to see what is going on ?

Dave

www.credativ.ca

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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: idea to have driver return immediately after a query
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: JDBC gripe list