Custom ID Generator in JPA orm.xml

I’m interested in creating a UUID v. 7 ID generator for my application. We use orm.xml instead of annotations. Is there a way to refer to a custom id generator using orm.xml?

In Hibernate ORM 7 there will be a way through orm.xml extensions. For now, you will have to use annotations, or simply create the UUID value yourself instead of relying on the Hibernate generator.

1 Like