특정 엔티티를 영속 상태로 만들 때, 연관된 엔티티도 함께 영속 상태로 만들도 싶을 때 사용한다. 예를 들어, 부모 엔티티를 저장할 때 자식 엔티티도 함께 저장할때 사용한다. 원래 기본은 Child child1 = new Child(); Child child2 = new Child(); Parent parent = new Parent(); parent.addChild(child1); parent.addChild(child2); em.persist(parent); em.persist(child1); em.persist(child2); 이렇게 child1, 2를 다 저장해야한다. 근데, @Entity public class Parent { @Id @GeneratedValue private Long id; p..