<aside> 1️⃣ 엔티티의 연관관계 매핑이란?

</aside>

<aside> 2️⃣ 연관관계 매핑 예시

</aside>

@Entity
public class Author {
    @Id
    private Long id;
    
    private String name;
    
    @OneToMany(mappedBy = "author")
    private List<Book> books;
    
    // Getters, Setters, Constructors ...
}

@Entity
public class Book {
    @Id
    private Long id;
    
    private String title;
    
    @ManyToOne
    @JoinColumn(name = "author_id")
    private Author author;
    
    // Getters, Setters, Constructors ...
}