Announcement Announcement Module
Collapse
No announcement yet.
Why to use Hibernate with JPA when using Spring? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why to use Hibernate with JPA when using Spring?

    Hello,

    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.

    Kind regards,
    Chris

  • #2
    Originally posted by charms View Post
    Hello,

    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.

    Kind regards,
    Chris
    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...

    Cheers,
    -Andy

    Comment

    Working...
    X