pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Dean Schulze <dschulze@knowledgefactor.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: JDBC Driver can't read UUID from database
Date: Wed, 6 Jun 2012 04:12:56 -0400 (EDT)
Message-ID: <alpine.BSO.2.00.1206060409230.12129@leary.csoft.net> (raw)
In-Reply-To: <CBF3F1DC.2E8%dschulze@knowledgefactor.com>
References: <CBF3F1DC.2E8%dschulze@knowledgefactor.com>



On Tue, 5 Jun 2012, Dean Schulze wrote:

> 
> I'm using Hibernate (3.6 and 4.0) with Postgresql 9.1.  Our tables have
> UUIDs in them and your driver is trying to convert UUIDs to longs:
> 

This is a hibernate mapping problem, not a JDBC Driver problem.  If you 
have a plain ResultSet and call getString() on a UUID field, it will 
certainly work.  Mapping the UUID to BLOB or CLOB is incorrect.  I'm not 
sure why your attempt to map it to a String didn't work, but you are 
not convincing Hibernate to use a plain getString call.

Kris Jurka


view thread (4+ messages)  latest in thread

Message-ID: <alpine.BSO.2.00.1206060409230.12129@leary.csoft.net>
Permalink:  ../alpine.BSO.2.00.1206060409230.12129@leary.csoft.net/
Also on:    postgresql.org/message-id/alpine.BSO.2.00.1206060409230.12129@leary.csoft.net

 · 

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-bugs@postgresql.org
  Cc: books@ejurka.com, dschulze@knowledgefactor.com
  Subject: Re: JDBC Driver can't read UUID from database
  In-Reply-To: <alpine.BSO.2.00.1206060409230.12129@leary.csoft.net>
  References: <CBF3F1DC.2E8%dschulze@knowledgefactor.com> <alpine.BSO.2.00.1206060409230.12129@leary.csoft.net>

* 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