Announcement Announcement Module
Collapse
No announcement yet.
Spring Data Support for Hibernate without Annotations? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Data Support for Hibernate without Annotations?

    I prefer using hibernate mapping files rather than annotating classes with JPA or Hibernate annotations. Does Spring data have support for this, and if not, is it in the road map?

  • #2
    Originally posted by SingleShot View Post
    I prefer using hibernate mapping files rather than annotating classes with JPA or Hibernate annotations. Does Spring data have support for this, and if not, is it in the road map?
    How is Spring not already supporting you ?

    What persistence method are you using ? Hibernate native (Session) or JPA (HibernateEntityManager) or both (yes this is possible too) ?


    Spring already allows you to configure the hibernate factory with custom properties. Some of those properties control the how mapping information is resolved. Using Hibernate with mapping files has been around a lot longer than annotations.


    Maybe post your configuration ? if you do not have configuration, maybe go read some documentation and blogs and try some things ?

    Comment


    • #3
      Thanks, but sorry, I should have been more clear. I already use Spring's hibernate support with Hibernate mapping files using my own custom repository framework. However, I would like to replace my framework with the fairly new Spring Data framework, which is very nice. It supports many ORM and NoSQL implementations, but does not appear to support Hibernate with mapping files. That's what I am asking about - does Spring Data actually support Hibernate with mapping files, and if not, is it on the roadmap?

      Comment


      • #4
        I think if you use the JPA persistence.xml and orm.xml for the definition of mappings it should work with Spring Data JPA.

        Comment


        • #5
          Forgot about this thread :-)

          I am new to JPA (I have always used "raw" Hibernate) - I didn't realize it supported mapping files. I am now using Spring Data JPA with mapping files. Thanks!

          Comment

          Working...
          X