views:

1094

answers:

5

How does Hibernate compare to NHibernate?

I've heard the claim that "Hibernate is much worse than NHibernate, even to the point of not using it (and using JDBC over it)". Can anyone support or refute this?

Update - I am not trying to decide between them. Our DAL team decided to use NHibernate for our .Net side, but not use Hibernate on the java side because "it is not good enough". Me being a newb to ORM, I'm trying to understand what are the differences.

Specifically, we are using Fluent NHibernate.

+8  A: 

NHibernate is a port of hibernate which is java over to .Net,

Currently NHibernate is only a subset of Hibernate but it is quickly catching up.

I think the two are comparable for the most part it's only the more advanced features which are different.

NHibernate has things like Linq based configuration which I don't think hibernate has an equivalent.

Ayende Rahien is probably the best person to answer this question he was one of the principal members of the nhibernate team. His blog is here

Peter
beware the linq2nhibernate library, its a bit lacking and is currently being rewritten. its good for simple things though
Andrew Bullock
+19  A: 

This claim is ridiculous. Hibernate was originally designed for Java and then ported to .NET. Hibernate is the most prominent ORM tool in Java today and it is highly acclaimed by developers. It is also an award winning framework.

kgiannakakis
+3  A: 

I would seriously question this comment.

Granted, Hibernate has a wealth of features, that require some investigation to understand fully. I would suggest that whoever made this comment has not read Java Persistence with Hibernate, which is a great reference.

It's also interesting to note that Grails uses Hibernate under the covers.

toolkit
+1  A: 

If you're like me and don't like the way Hibernate does business, you might try using iBatis. http://ibatis.apache.org/

Hardwareguy
Or DataNucleus www.datanucleus.org
Chris Kaminski
A: 

Always be dubious of claims that "A is worse than B" that aren't backed up by numbers and/or evidence.

matt b