What is the real difference beetwen javax api about jpa and persist method and save method about hibernate?
For example: If a use javax package and api , I will use persist method. But what is the difference about persist in javax package and save for hibernate?
CodePudding user response:
To be specific
JPA is a specification for the ORM. JPA does not provide any implementation.
Hibernate is a implementation of the JPA specification. Hibernate also provide some extra feature on top of JPA.
Not only hibernate, there are other implementations available of JPA.
If any hibernate specific implementation is used, after that we change the underlying jpa implementation, then your code base needed to be update.
CodePudding user response:
Hibernate includes all the JPA API, as JPA is a specification and Hibernate its implementation. At the same time, Hibernate provides some features on top of standard JPA. So, simply saying, Hibernate embraces the JPA API and extends it with additional features.