JPA(Java Persisitence API 는 자바의 객체관계맵핑(ORM, Object-Relational Mapping) 기술표준을 정의하는 인터페이스 모음으로 DB에 관련된 CRUD를 메소드를 통해 객체지향적 관리를 하기 위해 고안된 것이다.
* JAP(Java Application Platform)에서 DB 로딩 방식은 일반적으로 JDBC, JNDI(Java Naming and Directory Interface), DBCP(Database Connection Pool), 그리고 JPA를 통해 이루어진다.
엔티티가 연관 관계를 맺은 다른 엔티티를 언제 조회할지 결정하는 전략이 바로 로딩(fetch) 방식입니다.

필요하다면 아래와 같이 명시적으로 변경할 수 있다.
@OneToOne(fetch = FetchType.LAZY)
private Profile profile;
@ManyToOne(fetch = FetchType.EAGER)
private Team team;
사용예시
@Entity
public class Order {
@Id @GeneratedValue
private Long id;
@OneToMany(mappedBy = "order", fetch = FetchType.LAZY) // LAZY 또는 EAGER 지정
private List<OrderItem> items = new ArrayList<>();
}
@Entity
public class OrderItem {
@Id @GeneratedValue
private Long id;
@ManyToOne(fetch = FetchType.LAZY)
private Order order;
private String productName;
}
// 1) EAGER
List<Order> orders = em.createQuery("SELECT o FROM Order o", Order.class)
.getResultList();
Order → OrderItem 관계를 fetch = FetchType.EAGER로 설정했다고 상상 -- 예시를 다시 찾자