JPA 썸네일형 리스트형 CascadeType.ALL, orphanRemoval = true @Entitypublic class Customer { @OneToMany(cascadeType.ALL, orphanRemoval = true) @JoinColumn(name = "customer_id") private Set addresses;} 1. CascadeType.ALLEntity를 저장/수정/삭제 할 때 Addresses도 똑같이 저장/수정/삭제된다. 다만, Database레벨에서 이루어지는것이 아니라 JPA persistence provider에 의해서 이루어진다. 2. orphanRemoval = truecollection에서 Address가 삭제되는 경우 database에서도 address row를 삭제한다. 결과적으로 위와 같은 설정의 경우 Address객체의 lifeCycle은 Cu.. 더보기 QueryDSL Official Doc http://www.querydsl.com/static/querydsl/3.4.2/reference/ko-KR/html/ 더보기 [Java] Integer.compare(int x, int y) Java7부터 제공되는 API로 int 형 비교때는 이걸 사용하자.. Integer.compare(int x, int y) x - y로 계산 할 경우 오버플로우 가능성이 존재함. 더보기 [QueryDSL] group by with Tuple Sample 더보기 [JPA] QueryDSL로 쿼리 작성시 주의 사항 더보기 [JPA] Pro JPA2 study - Chapter 4 더보기 [JPA] Pro JPA2 study - Chapter 2 더보기 이전 1 다음