studyplan

Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (SPRING4.SYS_C007243) violated - parent key not found // 무결성 제약 조건 본문

문제해결

Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (SPRING4.SYS_C007243) violated - parent key not found // 무결성 제약 조건

무한머니 2022. 7. 27. 15:28

프로젝트 하는 도중 

SQLIntegrityConstraintViolationException 이란 제약 조건을 만났다 . 

이게 왜 생기냐면 

 

pk 관계와 fk 의 관계에서 제약조건을 걸어서 생긴 이슈인데 

그 제약 조건이 

fk 가 있을때 pk 는 지우지 못한다는 조건이었다 ! 

그래서 oracle 로 가서 fk 를 지우고 테이블까지 날려버리고 다시 

create table 로 다시 생성해서 

원래 작업 하려했던 원래 게시글들을 다 삭제해서 해결했다 ! 

 

 

 

 

 

Comments