Like I wrote in OptimisticLockException when manually setting the ID for the entity, you should be able to mark the SequenceOrAssignedGenerator
as bean e.g. with @Component
and then you wouldn’t have to change anything in the mappings. If you want to go the route of @IdGeneratorType
I think you simply have to remove the @GeneratedValue
.