Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 파이썬
- 메모리 구조
- API
- BindingResult
- 오블완
- 편향된 지수
- 프로그래머스
- 쉘 스크립트
- compgen
- 알고리즘
- 런타임 상수
- spring
- mysql
- intelij spring config
- 기본키 전략
- 백준
- JDBC
- m:n
- DTO
- @SubscribeMapping
- JPA
- application layer
- 티스토리챌린지
- 커밋 되돌리기
- 쿠키
- allocationSize
- 컴파일 타임 상수
- Git
- 리눅스
- @Autowired
Archives
- Today
- Total
목록OrphanRemoval (1)
둘셋 개발!

intro.jpa를 공부하다가 orphanRemoval 옵션이 제대로 동작하지 않았다.orphanRemoval 옵션을 true로 하면 고아객체 발생 시 해당 고아객체는 삭제되어야 하는데 삭제가 안된 것이다. 클래스 구성클래스로는 Parent와 Child가 있고,Parent : Child는 1: N의 관계를 가지고 있다. Parent.class@Entitypublic class Parent { @Id @GeneratedValue private Long id; private String name; @OneToMany(mappedBy = "parent", orphanRemoval = true) // 옵션 적용 private List childList = new ArrayList..
JPA
2023. 11. 2. 15:18