JPA Interview Questions and Answers
Question: What is the difference between persistence.xml and hibernate.cfg.xml?Answer: When using JPA need persistence.xml and while using Hibernate API need hibernate.cfg.xml. When using JPA or Hibernate not needed both xmls, need the xml configuration file according to JPA or Hibernate. |
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?