HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
[팀]조규현 공간(1-2)
[팀]조규현 공간(1-2)
/
🪧
2021-10-01 금
🪧

2021-10-01 금

날짜
Oct 1, 2021
참여자
스크럼마스터
태그
코드리뷰
스크럼마무리점검 (6시 40분)이슈오늘의 링크 공유

스크럼

  • 오전 스크럼
    • 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차캐시에서 엔티티를 가져오지 않는 것인가요? (희정님 덕분에 해결했습니다!)
JPA 영속성 컨텍스트 주의 점 - Yun Blog | 기술 블로그
엔티티 관계는 위와 같습니다. teamA를 영속화 이후, member1, member2를 영속화를 진행합니다. member1, member2는 teamA 소속이 됩니다. 그리고 fetch join통해서 teamA와 teamA에 속한 member를 조회하고 있습니다. 그리고 then절에서 member1, member2가 teamA 에 있는지 검증을 진행합니다. 이 테스트 코드는 실패합니다. 디버깅 모드로 보면 memebers SIZE가 0인 것을 확인할 수 있습니다.
JPA 영속성 컨텍스트 주의 점 - Yun Blog | 기술 블로그
https://cheese10yun.github.io/jpa-persistent-context/
JPA 영속성 컨텍스트 주의 점 - Yun Blog | 기술 블로그
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); }
notion image

오늘의 링크 공유

목록
Name
Tags
Created
Date