Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News The Uncertain Future of NHibernate

The Uncertain Future of NHibernate


For many years NHibernate reigned as the premier ORM for the .NET framework and despite the successes of Entity Framework many people still consider it their first choice for new projects. But a lack of developers may severely hamper its future.

Currently there are only two significantly active developers, Alexander Zaytsev of Fourth Media and Oskar Berggren. They are making great strides in preparation for NHibernate 4 on .NET 4.0, but that doesn’t change the fact that .NET 4.0 was released over three years ago. Since then a lot has changed. Most prominently is the introduction of async/await with .NET 4.5, a feature that is rapidly becoming essential for any library that deals with I/O. According to Ricardo Peres, other issues include its lack of support for left joins in LINQ queries, the need for more documentation, and “usage of an obscure collection library called Iesi.Collections”. He continues,

NHibernate’s problem, in my opinion, is lack of leadership. As far as I know, it is not known if the next version of NHibernate will be 3.4 or 4, and what will be there, except, of course, bug fixes, and even less what will NHibernate evolve to, when will it support .NET 4.5 constructs such as async, and so on. The NHibernate Development list is very quiet, and these questions, as well as lots of others, have had no response to this date.

While Entity Framework’s functionality is way behind NHibernate – and believe me, it really is – it is gaining ground. Entity Framework has a leader, a well known team which makes its discussions publicly available and takes suggestions from the community in the form of requests and even code patches, some of which have already been incorporated in the main product. The next major version, 6, was announced some time ago, public betas already exist – and, of course, anyone can get the current version from CodePlex – and it points to a direction. Granted, it is not going to address any of NHibernate’s stronger points, but instead it is moving with what appears to be the current trend, namely, asynchronicity, .NET 4.5 integration and conventions.

Adam Bar echoes these thoughts,

Are there any new features planned for 4.0? Well, there are some, but I can't say the list is impressive. SQL Server 2012 will be supported better (sequences, limit feature), Ingres9 will be also supported out of the box and few other dialects will have some improvements. But, let's admit it, this is not a big deal for existing users. There are of couse several bugfixes and minor improvements done and planned for that version, i.e. in Linq provider (NH-3186, NH-2852, NH-3056, NH-2915, NH-3256), in mapping-by-code (NH-3280, NH-3313). There is also one possibly significant performance improvement with Linq queries done.

This isn’t to say things can’t change. The NHibernate community is still quite large and there are a lot of code bases that cannot be switched from it to another ORM. It is just a matter of mobilizing them.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Future of NHibernate

    by James Nail,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    It seems that one of NHibernate's problems right now is that so many of its high-profile former proponents have pretty much given up on O/R mapping altogether, going with NoSQL databases instead.

  • Comparison between EF 5/6 and NHibernate 3.3

    by Dennis Doomen,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    To better illustrate the difference in features, I've looked at the state of affairs from a domain driven design perspective.

  • Re: Future of NHibernate

    by Eugene Tolmachev,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Agreed. ORM was a stop-gap until object/document storage has sufficiently evolved. Unless one has to care about backward-compatibility or integrate on database level, it's hard to justify the trade-offs.
    I shudder to think about the challenges one would have to deal with considering things like transaction scope in async context; there are simpler ways to partition and parallelize your processing.
    Microsoft is busy reinventing the wheel, while the cool kids go "where we are going we don't need the roads".

  • EF is much like EJB 1/2

    by Mac Noodle,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    We have used EF some. One of the things that is really a no go is that i cannot seem to find a way to use it with Spring.NET. I am not sure if there is any other IoC framework that supports it.

    Also, it seems to suffer from NIH.

    In the version we used, entities were to tightly coupled to the db tables and to the framework itself. They are not POCOs.

    But one of the biggest things is that it tries to do to much just like EJB 1/2 did. It just reminds of them a lot.

    It will be sad if NHibernate goes away because there are just some projects that cannot be move to Java (as that would be one solution).

  • Yet another comparison

    by Vladimir Khorikov,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Entity Framework is still moving in a wrong direction.

  • Re: Yet another comparison

    by Anthony Smith,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    If anyone is interested in making something about the developer experience (regarding NHibernate) I would like to invite to a survey: Answers will help me prioritize backlog for new NHibernate plugin.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p