외래키 제약 조건 위반
Referential integrity constraint violation:
"FKL5MNJ9N0DI7K1V90YXNTHKC73: PUBLIC.ORDER_PRODUCT FOREIGN KEY(ORDER_ID) REFERENCES PUBLIC.ORDERS(ID)"
🔥 원인
@AfterEach
void tearDown() {
orderRepository.deleteAllInBatch(); // 💥 먼저 orders 삭제 시도
productRepository.deleteAllInBatch(); // products
mailSendHistoryRepository.deleteAllInBatch();
}✅ 해결 방법
✅ 방법 1: 삭제 순서 변경
Last updated