Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between JPA and JPA2 [closed]

Does anyone have a list of the changes between JPA 1 and JPA 2? I have read about the Criteria queries and other changes, but I would like a "what's new" kind of reference. Thanks

like image 464
Guillermo Vasconcelos Avatar asked Aug 27 '09 15:08

Guillermo Vasconcelos


People also ask

What is the main difference between JPA and Hibernate?

Conclusion: The major difference between Hibernate and JPA is that Hibernate is a framework while JPA is API specifications. Hibernate is the implementation of all the JPA guidelines.

What is difference between JPA and Hibernate with example?

Java Persistence API (JPA) defines the management of relational data in the Java applications. Hibernate is an Object-Relational Mapping (ORM) tool which is used to save the state of Java object into the database. It is just a specification. Various ORM tools implement it for data persistence.

What is jpa2 Hibernate?

It is used to create and remove persistent entity instances, to find entities by their primary key identity, and to query over all entities. This interface is similar to the Session in Hibernate.

What is the difference between JPA and Spring data JPA?

Spring data jpa- it is same like jpa means we can describe in below way. Spring Data Jpa is jpa data abstraction access which means it likes a jpa but it add some extra functionality, Without jpa we can not implement the spring data jpa.


1 Answers

Google returns many results, including this and this blog posts. The summary (copied from the former) is:

  • Added support for persistently ordered lists using OrderColumn and provider-managed ordering column
  • Defined support for foreign key mapping strategy for unidirectional one-to-many relationships
  • Added clear method to EntityManager interface to allow entities to be evicted from the persistence context; added CLEAR cascade option.
  • Added Cache interface.
  • Added support for pessimistic locking and new lock mode types.
  • Added overloaded find and refresh methods added to support locking with standardized and vendor-specific properties and hints.
  • Added standardized hint javax.persistence.lock.timeout for use in locking configuration.
  • Added the standardized properties javax.persistence.jdbc.driver, javax.persistence.jdbc.url, javax.persistence.jdbc.user, javax.persistence.jdbc.password for use in persistence unit and entity manager factory configuration.
  • Added Query getNamedParameters and getPositionalParameters methods.
like image 135
ChssPly76 Avatar answered Sep 18 '22 20:09

ChssPly76