pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: sdavidr <david.ricoma@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Problems with Hibernate Discriminators and 9.0-801.jdbc4
Date: Wed, 23 Mar 2011 16:35:57 -0700 (PDT)
Message-ID: <1300923357612-4259788.post@n5.nabble.com> (raw)

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-tp4...
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.



view thread (19+ messages)  latest in thread

Message-ID: <1300923357612-4259788.post@n5.nabble.com>
Permalink:  ../1300923357612-4259788.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1300923357612-4259788.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: david.ricoma@gmail.com
  Subject: Re: Problems with Hibernate Discriminators and 9.0-801.jdbc4
  In-Reply-To: <1300923357612-4259788.post@n5.nabble.com>
  References: <1300923357612-4259788.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox