Dec 25th, 2012, 08:32 PM
Why to use Hibernate with JPA when using Spring?
I'm currently learning how to use Spring.
I want to use JPA with Spring. All examples I have seen on the web are using Hibernate as Entity Manager. Is this really necessary? Or is this considered as best practice?
Can you tell me which dependencies (best based on Maven) are necessary to use JPA with Spring?
Thanks for your answers.
Dec 27th, 2012, 01:20 PM
You can use whatever JPA Provider you choose. Hibernate is common to see examples of because it's the most widely used. But OpenJPA, EclipseLink, or DataNucleus should all work fine. And each has their own subtle differences. Different query generation. Different handling of @Lob. Different caching. etc...
Originally Posted by charms