Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jpa-dev] Using UUID primary key with JPA 3.1 on PostgreSQL

Hi Maarten,

use

	@Id
	@GeneratedValue(strategy = GenerationType.UUID)
	private UUID id;

works fine for me with Hibernate (WildFly) and Postgres.

Regards,

Bernd

Am 19.01.23 um 19:07 schrieb Maarten Mulders:
Hi all,

Not sure if this is the right place to ask, so feel free to redirect me if my question is not in the right place.

While upgrading a sample app from Jakarta EE 9 to Jakarta EE 10, I was looking forward to using JPA 3.1. In the announcements, I read that I should be able to use UUID types directly, without custom converters or such.

Unfortunately, I wasn't able to get it to work. Now, I am in doubt if what I found is a scenario that is not supposed to work, or a bug. If it's not supposed to work, I'd love to learn *why*. If it's a bug, I found there's a relatively simple way I believe it could be fixed [2].

I'd love to hear your opinions about this issue!

Thanks in advance,


Maarten


[1] https://github.com/eclipse-ee4j/eclipselink/issues/1771
[2] https://github.com/eclipse-ee4j/eclipselink/pull/1778
_______________________________________________
jpa-dev mailing list
jpa-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jpa-dev


--
Prof. Dr. Bernd Müller

Ostfalia
Hochschule für angewandte Wissenschaften
- Hochschule Braunschweig/Wolfenbüttel -
Fakultät Informatik
Salzdahlumer Straße 46/48
38302 Wolfenbüttel

Tel  +49 5331 939 31160
Fax  +49 5331 939 31004
Web  www.ostfalia.de / www.pdbm.de


Back to the top