I have two questions.
- Why JPA came into picture, even though hibernate was there?
- Hibernate came before JPA. But still, why do hibernate follows JPA specifications?
I have two questions.
- Why JPA came into picture, even though hibernate was there?
Because there wre other ORM implementations besides Hibernate, and JPA emerged as the standard API.
- Hibernate came before JPA. But still, why do hibernate follows JPA specifications?
Because the Java EE application servers use JPA, and Spring Data JPA uses the standard API. If Hibernate did not implement the JPA spec, it would be less practical.
Even if Hibernate implements the JPA spec, it also provides many additional features. For more details, check out this StackOverflow answer.