Problems with Hibernate Discriminators and 9.0-801.jdbc4

From: sdavidr <david(dot)ricoma(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Problems with Hibernate Discriminators and 9.0-801.jdbc4
Date: 2011-03-23 23:35:57
Message-ID: 1300923357612-4259788.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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!

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Problems-with-Hibernate-Discriminators-and-9-0-801-jdbc4-tp4259788p4259788.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Kellerer 2011-03-24 13:12:58 How to retrieve column names for tables with underscores
Previous Message Sean Bowman 2011-03-21 15:55:30 Re: imlicit varchar truncation