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