JPA2 JPA는 왜 기본생성자가 필요할까? (feat. 접근 제어자 범위) This default constructor is used by JPA to create instances of the entity class using Reflection. It provides a way to dynamically create instances of classes, call methods, and access fields. https://www.baeldung.com/jpa-no-argument-constructor-entity-class Need for Default Constructor in JPA Entities | BaeldungLearn about the JPA requirement for a default no-argument constructor in an Entity c.. 2025. 5. 26. @Transactional이 없을 때 Lazy 로딩이 실패하는 이유 지연로딩(LAZY)에서 @Transactional이 없으면 proxy 초기화 오류가 발생합니다.즉시로딩(EAGER)을 선택했을 때는, 오류가 발생하지 않습니다. 왜 이런 상황이 발생할까요? 예시 테스트 코드 설명 Member - Reservation이 연관관계를 가지고 있습니다.하나의 멤버는 여러개의 예약을 가질 수 있는 상황이기에 Reservation에 ManyToOne 관계를 설정해놨습니다.@Entitypublic class Member { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; public Member() {} public Member(.. 2025. 5. 21. 이전 1 다음