일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 무상태프로토콜
- 멱등활용
- KAKAOLOGINAPI
- DB방언
- ERROR TYPE : org.apache.ibatis.binding.BindingException
- HTTP3
- fixedDelay
- 김영한JPA
- JPA
- gitreset
- 자바ORM표준프로그래밍
- hibernate.dialect
- SpringBoot
- 네이버로그인API
- 네이버 연결된 서비스
- 매핑정보가없는필드
- 데이터베이스 방언
- Invalid bound statement (not found)
- @Entity
- Git
- 캐쉬가능
- @Table
- RFC723x
- HTTPMESSAGE
- http
- Transaction not successfully started
- anyMatch
- gitrevert
- org.apache.ibatis.binding.BindingException
- initialDelay
Archives
- Today
- Total
twocowsong
연관된 엔티티 삭제 본문
연관된 엔티티를 삭제하려면 기존에 있던 연관관계를 먼저 제거하고 삭제해야합니다.
그렇지않으면 외래 키 제약조건으로 이해 DB오류가 발생합니다.
팀1 에는 회원 1과 회원2가 소속되어있습니다.
이때 팀1을 삭제하려면 연관관계를 먼저 끊어야합니다.
Team team = em.find(Team.class, "team1");
Member member1 = em.find(Member.class, "member1");
Member member2 = em.find(Member.class, "member2");
member1.setTeam(null);
member2.setTeam(null);
em.remove(team);