Old solution:
@Id
@GeneratedValue(generator = "UUID")
@GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator")
private UUID id;
New solution (since hibernate 6.2):
@Id
@UuidGenerator
private UUID id;
Old solution:
@Id
@GeneratedValue(generator = "UUID")
@GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator")
private UUID id;
New solution (since hibernate 6.2):
@Id
@UuidGenerator
private UUID id;