Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20210314] JPA @Embedded, @Embeddable #67

Open
JuHyun419 opened this issue Mar 14, 2021 · 0 comments
Open

[20210314] JPA @Embedded, @Embeddable #67

JuHyun419 opened this issue Mar 14, 2021 · 0 comments
Labels

Comments

@JuHyun419
Copy link
Owner

JPA @Embedded, @embeddable

  • Entity에서 다른 객체를 사용
  • 컴포지션(합성) 관계
@Entity
public class Post extends BaseTimeEntity {

    @Embedded
    private Writer writer;

}


@Embeddable
public class Writer {

    @Column
    private String name;

    @Column
    private String email;

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant