This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device.

The Open Source Zone


Most popular Java ORM tool

Hibernate review.

Written on May 10, 2005 by Ugo Cei

Rated: 5/5.

Even though some vehemently disagree, it is my firmly held opinion that Object/Relational Mapping (ORM for short) is a powerful weapon in the arsenal of any entrerprise developer working with an Object-Oiented language. Should you decide to take the plunge and use a full-featured ORM tool for your next project, after you have done some research, it will be evident that there is a great deal to choose from, even if you limit yourself to Open Source, Java libraries. Everybody seems to have rather strong opinions on the matter. The only point on which you will find agreement from most parties is that EJB sucks, but that's another story.

I won't try to convince you that Hibernate is the best solution, mostly because I have almost no hands-on experience with JDO, OBJ or other similar tools. What I have to share is a two year long, mostly positive, experience with Hibernate, having developed a dozen or more projects with it.

What's so good about Hibernate?

  • Non-intrusive, almost completely transparent, persistence for Plain Old Java Objects (POJOs). In short, you don't have to extend Hibernate-specific interfaces in order to make an object persitent and you don't have to obey unnatural rules (like "no inheritance"). You can use plain object references and Java2 collections to express relationships and you can map rather complex cases, including class hiearchies, with Hibernate.
  • No need for pre- or post-processing of source- or byte-code. This means a simpler tool chain and quicker edit-compile-deploy cycle.
  • Good tooling, although it might be better.
  • Good docs. Plus, there are lots of books dealing with Hibernate. I reviewed one of the best here.
  • Very robust, bug-free and performant code.
  • Caching.
  • A very good query language (HQL), with the option of falling back to SQL when you need it.
  • Much more...

What's not so good about Hibernate?

Well, the only real gripe I have with it is probably the fact that, for all practical purposes, Hibernate is owned by JBoss. Not that I have anything against Mr. Fleury's gang, but given JBoss's revenue model (support and services), it might come as no surprise that suppport is relegated to a forum (I would prefer a mailing list, but that's just me) and responses from the development team tend to be just a little bit terse, at times.

On the other hand, this is perfectly legit. If you want pro-level support, even with an Open Source project, you should be prepared to pay for it.

All in all, I give Hibernate 5 stars (out of 5). Highly recommended!

Report abuse.