일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- JPA
- @Entity
- 네이버 연결된 서비스
- http
- Transaction not successfully started
- ERROR TYPE : org.apache.ibatis.binding.BindingException
- gitreset
- HTTP3
- RFC723x
- KAKAOLOGINAPI
- HTTPMESSAGE
- anyMatch
- Invalid bound statement (not found)
- 데이터베이스 방언
- 매핑정보가없는필드
- Git
- 김영한JPA
- @Table
- fixedDelay
- gitrevert
- org.apache.ibatis.binding.BindingException
- 캐쉬가능
- 멱등활용
- initialDelay
- 무상태프로토콜
- 네이버로그인API
- hibernate.dialect
- DB방언
- SpringBoot
- 자바ORM표준프로그래밍
Archives
- Today
- Total
twocowsong
연관관계 제거 본문
이번에는 연관관계를 제거하겠습니다.
회원1을 팀에 소속하지 않도록 변경하겠습니다.
public static void deleteRelation(EntityManager em) {
Member member1 = em.find(Member.class, "member1");
member1.setTeam(null);
}
연관관계를 null로 설정하였습니다. 일때 실행되는 연관관계 제거 SQL은 아래와같습니다.
UPDATE MEMBER
SET TEAM_ID = null
WHERE MEMBER_ID = 'member1'