2

When using Hibernate it is possible to mark field of JPA-entity with @org.hibernate.annotations.Type(type="org.hibernate.type.PostgresUUIDType") if you want to map fields of type java.util.UUID to uuid type of PostgreSQL.

Is there such analogue in EclipseLink? Found solutions with writing your own converter (f.e.: http://www.enterprisedb.com/postgres-plus-edb-blog/richard-yen/4-steps-using-uuids-jpa-postgresql) are not convenient.

Michał
  • 2,456
  • 4
  • 26
  • 33
Renat Sh
  • 41
  • 3
  • With Hibernate 5, at least, it's not necessary to provide the annotation; Hibernate just maps it automatically. Have you checked whether EclipseLink handles it for you? – chrylis -cautiouslyoptimistic- Dec 01 '16 at 06:56
  • 1
    @chrylis Yes, I checked it. It gives an error that _column “uuid” is of type `uuid` but expression is of type bytea_. My eclipselink version is 2.5.2. – Renat Sh Dec 01 '16 at 10:04

0 Answers0