I am trying to update an object and I’m getting these errors:
SQL Error: 2290, SQLState: 23000 2020-11-26 09:05:18.187 ERROR 6395 --- [ XNIO-1 task-62] o.h.engine.jdbc.spi.SqlExceptionHelper : ORA-02290: check constraint (T_MATRICULE) violated 2020-11-26 09:05:18.187 ERROR 6395 --- [ XNIO-1 task-62] o.h.i.ExceptionMapperStandardImpl : HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute statement]
Advertisement
Answer
This:
ORA-02290: check constraint (T_MATRICULE) violated
says that there’s a check constraint on a column, and it was violated. You should check the constraint and … well, NOT violate it while updating that column.
For example, it might be that column allows values 1
(meaning “on”) and 0
(meaning “off”) and you tried to update it to 2
.