ERROR!!!!!!!

nested exception is org.hibernate.exception.ConstraintViolationException

voider 2020. 10. 2. 19:24

JPA 테스트 중 에러

Referential integrity constraint violation: "FKR1BMBLQIR7DALMH47NGWO7MCS: PUBLIC.REPLY FOREIGN KEY(BOARD_BNO) REFERENCES PUBLIC.BOARD(BNO) (75)"; SQL statement:
insert into reply (board_bno, replyer, text) values (?, ?, ?) [23506-200]
could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

PK제약조건이 중복되어서 생기는 오류.
PK가 중복되지 않게 설정하고 다시 테스트 진행하니 무사히 통과.