I saw that the ID type is defined in every JPA table. Is it mandatory?
Or is there any option that I can get class without the ID member?
I saw that the ID type is defined in every JPA table. Is it
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Id(i.e. primary key) is mandatory in JPA. As JSR317(Java Persistence API, which could be downloaded here) chapter 2.4 said(first sentence):
BTW, besides
Idannotation, one can also useEmbeddedIdannotation for composite primary keys.