-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: PostgreSQL 8.3 uuid type and JPA columnDefinition=uuid
PostPosted: Wed Mar 05, 2008 6:09 pm 
Newbie

Joined: Tue Feb 22, 2005 10:35 am
Posts: 2
Hi,

I am trying to map my entity so the id is an uuid. I would like to use uuid type that is available in PostgreSQL 8.3.

I am doing something like this
Code:
@Id @Column(columnDefinition="uuid", nullable=false)
private String id;
(yes I know it will not be portable)

Table is created correctly (i.e. column is of type uuid) but when I try to persist anything I get the following exception:
Quote:
ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: column "id" is of type uuid but expression is of type character varying
.
When I call insert statement with uuid that has been generated everything works.

Anyone might have an idea how to solve this?

Rgds,

/p


Top
 Profile  
 
 Post subject: No response
PostPosted: Sun Mar 09, 2008 2:10 pm 
Newbie

Joined: Tue Feb 22, 2005 10:35 am
Posts: 2
Any ideas? Anybody?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.