Sensibles93
Sensibles93

Reputation: 23

Does MyBatis follows JPA?

I've been working with myBatis for a few months as my first ORM. Now I'm trying to learn something else like Hibernate/JPA. At first it was hard to understand a difference between Hibernate and JPA. After few minutes of research I understood that JPA is just a specification and Hibernate is concrete implementation of JPA. In this video: link everything is nicely explained but author of the video is treating myBatis(iBatis) like JPA implementation. Is this a good approach? Does myBatis follows JPA? There is one answer, but is 11 yrs old: link2. In my apps with myBatis I don't have to use JPA specific objects / annotations, so it means that myBatis doesn't follow JPA?

Upvotes: 2

Views: 3111

Answers (1)

myBatis does not implement JPA.

In the video you mentioned there's nothing about ibatis/mybatis being a JPA implementation. mybatis is treated as ORM (which it is) instead. In the video it is said that hibernate, ibatis and toplink all have very different interfaces and you can't replace one with another effortlessly. And it would be nice to have one API that allows to work with different implementations. But it does not imply that JPA (being such an API) is implemented by all mentioned ORMs.

Upvotes: 2

Related Questions