0

I was trying to develop a Jhipster Quarkus app with two entities, Product and Category. I've generated the app but when I try to add a category I get the issue mentioned

my jdl file :

`entity Product { designation String prix Double quantity Integer }

entity Category { libelle String }

relationship ManyToOne Product{Category(libelle)} to Category }`

Caused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Violation d'index unique ou clé primaire: "PRIMARY KEY ON PUBLIC.CATEGORY(ID) ( / key:1 / CAST(1 AS BIGINT), 'Table')" Unique index or primary key violation: "PRIMARY KEY ON PUBLIC.CATEGORY(ID) ( / key:1 / CAST(1 AS BIGINT), 'Table')"; SQL

2
  • Could you update question with stacktrace and entities so we can help ?
    – Jacouille
    Sep 7 at 12:29
  • Well check the contents of your table in h2 console, it si probably not empty and contains already a row with key 1 that was created by CSV file loaded by Liquibase. CHeck also the CSV file Sep 7 at 15:34

0

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.