As far as I know Hibernate has two types of implementations
- implementation of JPA (2)(@Entity,@Table annotations)
- extension to older(conventional) hibernate (without JPA) ,HSQL queries are used, there is not annotation
If it is true, Why do we need second type of implementation while JPA is the ORM specification?
If you can give API version while comparing them it could be better for me to understand the whole evaluation history of ORM?
Thanks.
Hibernate was one of the first ORM tools, before the JPA specification. It was also developer before Java 5 (when annotations became available in Java), so everything used to be either XML configuration based, or XDoclet.
There was a big revamp of Java EE , which borrowed heavily from Spring and Hibernate, that introduced JPA but was also “generic” enough that you could plug in your own implementations.
There’s no real difference in how hibernate works, just what mechanism you use to configure it. JPA annotations is now the standard, but you can still use XML only if you want.