• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate general question  RSS feed

 
Ravi Desigan
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am attending some training sessions for Hibernate and the trainer (online) uses hbm files for mapping one-to-many, many-to-many associations, etc.

I wonder which method is used commonplace across USA - the hbm approach or the annotations approach?

Thanks.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My colleagues and I wrote a web application several years ago and we used Hibernate. We used the HBM approach because annotations didn't exist at that time, or at least the version of Java which we could use didn't have annotations. I've been retired for three years now but I would bet my remaining colleagues have not modified the application to use annotations yet. Why not? Because that would constitute using expensive programmer time on behalf of making the application do exactly what it did before.

My point here is that you'll find a lot of applications in the field which use the HBM approach. One would hope that people writing new Hibernate code in 2017 would be using annotations, but having seen elsewhere on this forum how people are still using technologies which have been obsolete for over a decade I would say that's not a certainty either.

It's common for people getting into the software industry to imagine they will get to work on shiny new systems. But there are billions of lines of code out there doing important work for all kinds of organizations, and those need to be maintained and updated. If you get to work on a Hibernate-based system in the future it may well be one of those.
 
Ravi Desigan
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Paul.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!