[JPA] ConstraintViolationException
본문 바로가기

Web 개발/Java, SpringBoot, JPA

[JPA] ConstraintViolationException

728x90
반응형

could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

 

JPA에서 테이블명을 변경하며, 기존테이블이 존재하는 상태에서 새로운테이블이 추가했더니

해당 테이블과 FK가 걸려있던 테이블에 접근할 때 오류가 발생하였다.

결론적으로 기존테이블을 삭제하여 해결하였다.

728x90
반응형