I have an entity and I want it to have an id in a UUID table
When annotating a field like
@Id @GeneratedValue(generator = "increment") @GenericGenerator(name = "increment", strategy = "increment") @Column(name = "data_id") private UUID id; I get an error
Ошибка: org.springframework.orm.jpa.JpaSystemException: Unknown integral data type for ids : java.util.UUID; nested exception is org.hibernate.id.IdentifierGenerationException: Unknown integral data type for ids : java.util.UUID when calling a method to save this entity in the controller
Data data1 = new Data(UUID.randomUUID(), другие параметры, , , ); dataRepository.save(data1);