Inflearn Community Q&A
@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





