스크럼
- 오전 스크럼
- 10/3(일) 까지 과제 리뷰를 끝내자!
- 리뷰해보고 리뷰 방식 개선 사항이 생기면 남겨보자!
- 다 같이 회의실에서 코어타임 진행, 방해받고 싶지않으면 개인 룸으로 이동하기
마무리점검 (6시 40분)
- 연관관계 매핑부분에서 어려움을 겪는 중..
- docs 설정할때 오류나는 원인 → 인텔리제이 문제 같음. 오류나도 그냥 실행된다.
이슈
- 궁금증 : orphanRemoval의 기본값은 왜 false 일까?
- cascade 옵션이 기본으로 설정 되어 있지 않은것과 같은 맥락 같습니다!
- https://stackoverflow.com/questions/64998743/why-does-jpa-onetoone-even-onetomany-have-its-orphanremoval-default-to-false
- 2. findById는 1차캐시에서 엔티티를 가져오지 않는 것인가요? (희정님 덕분에 해결했습니다!)
public Optional<T> findById(ID id) { Assert.notNull(id, "The given id must not be null!"); Class<T> domainType = this.getDomainClass(); if (this.metadata == null) { return Optional.ofNullable(this.em.find(domainType, id)); } else { LockModeType type = this.metadata.getLockModeType(); Map<String, Object> hints = new HashMap(); this.getQueryHints().withFetchGraphs(this.em).forEach(hints::put); return Optional.ofNullable(type == null ? this.em.find(domainType, id, hints) : this.em.find(domainType, id, type, hints)); } }
@Test void test() { customerRepository.save(customer); customerRepository.findById(1L); customerRepository.findById(1L); }

오늘의 링크 공유
목록