인프런 커뮤니티 질문&답변
퀴즈
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
답변 1
0
안녕하세요. 김민지님, 공식 서포터즈 OMG입니다.
어떤 엔티티의 id인지 구체적인 명시로 얻는 장점이 있으며 추가적인 이유는
아래 영한님의 설명을 참고해주세요(17분~)
https://www.inflearn.com/course/ORM-JPA-Basic/lecture/21695?tab=curriculum&volume=1.00
중요한 것은 한 프로젝트 내에서 네이밍 규칙은 일관되게 가져가는 것이라 생각합니다 :)
감사합니다.





