JPA is an API specification for persistent objects. It defines the SQL query language and annotations to define entities and relationships.
Hibernate is a JPA implementation that has various extensions, as well as an outdated API and query language. As long as you do not use any Hibernate extensions and adhere to the JPA API, you can more or less consider it interchangeably with other JPA implementations such as OpenJPA, TopLink, etc.
locka source share