JPA Interview Questions and Answers
Question: What is an Entity?Answer:A class which should be persisted in a database it must be annotated with javax.persistence.Entity. Such a class is called Entity. An instances of the class will be a row in the person table. So, the columns in the person table will be mapped to the Person java object annotated as @Entity. While insert, update or fetch record to or from the database we use entity as mapping with relational tables. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is ORM in JPA?
- What is an EntityManager?
- What is the difference between persistence.xml and hibernate.cfg.xml?
- What is an Entity?
- Why to use JPA?