강의

멘토링

로드맵

Inflearn Community Q&A

aszx69920203's profile image
aszx69920203

asked

Java ORM Standard JPA Programming - Basics

Field and Column Mapping

@Column 어노테이션에 관하여

Written on

·

309

2

컬럼 어노테이션은 여러번 사용 할 수 있는 건가요?

예를들어 

@Column(name = "Nick_name")

private String name;

@Column(name = "Adress")

private String addr;

 

이런식으로 여러개 컬럼으로 각 필드마다 매핑을 해주어야 하나요?

javaJPA

Quiz

66% of people got it wrong. Give it a try!

A class using the `@Entity` annotation for JPA mapping must basically meet these important conditions: 1. It must have a no-argument constructor (default constructor). 2. It must have a field representing the primary key, usually marked with the `@Id` annotation. 3. The class itself cannot be `final`. 4. It cannot be an `enum` or an `interface`.

All fields must be public

must be a final class

Must have a public or protected default constructor

must include at least one static method

Answer 1

1

안녕하세요. csjy님, 공식 서포터즈 David입니다.

네, 여러 번 사용 가능하며 각 필드마다 매핑해주어야 합니다.

감사합니다.

aszx69920203's profile image
aszx69920203

asked

Ask a question