JPA 1대N 관계 양방향 매핑 상황별 쿼리 갯수 예측
·
개발(레거시)/JPA
첫 번째 상황 package hellojpa; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.EntityTransaction; import javax.persistence.Persistence; import java.util.List; public class JpaMain { public static void main(String[] args) { EntityManagerFactory emf = Persistence.createEntityManagerFactory("hello"); EntityManager em = emf.createEntityManag..