Broke and happy, NHibernate 2.0 is out!

Heh, sorry, the title is a bit misleading because although my cash reserves have been significantly drained by the purchase of a house, I am not broke.  But my code is, now that NH 2.0 has finally been released.  This finally means that I can start programming against solid production code.  However this release is not without its caveats.  NHibernate.Linq has been a project that I have been folowing quite closely and actually using.  Back around the time that Beta 2 of NH 2.0 was released, the NHibernate.Linq project was moved into the NHibernate.Contrib project and relatively quickly lapsed into obsolecence as it has not been able to be built against the releases for some time now.  I was hopefull that by the time 2.0 was actually released that NH.Linq would be caught up, but alas that was not the case.  The reason why is that there is  new, better, and refactored linq support on its way for NHibernate and is scheduled for the 2.1 version of NHibernate.  That’s great and all but it doesn’t really help poor schmoes like me who want to use the existing linq features for now.

Ok that’s enough whining for now, on to the fixing.  The main problem is that criteria queries have lost the property to spit out the name of the persitent class they are linked to.   Also some methods have been added to the ICriteria interface and some things have changed in the factory also to do with persistent class names.  Using my meager NHibernate skills I think I have worked around all these issues except for one (no more criteria comments) and if you are brave enough you can try the dll or apply the svn patch.  All of the tests ran fine for me, but I really havn’t had a chance to play around with it extensively.

This archive includes both a patch for applying to your NHibernate.Linq svn directory, and an NHibernate.Linq dll that is built against NHibernate 2.0GA.

Download at your own risk.

7 Responses to “Broke and happy, NHibernate 2.0 is out!”

  1. Fabio Maulo Says:

    Hi Daniel.
    I’m Fabio Maulo.
    Please contact me in private mail.

  2. Инъекция в разум : NHibernate 2.o и Linq. Says:

    […] NHibernate Contrib. Реализация основана на NHibernate 2.0 Beta2 (Daniel Guenter реализовал патч, позволяющий работать ей не с […]

  3. Mike Says:

    It still uses a different build: while the current release is (2.0.1 GA).

  4. Daniel Guenter Says:

    Please go here to get the version compiled against

  5. mike Says:

    Great, thanks!

  6. Tony Says:

    Thanks alot Daniel!

    This article helped to point me in the right direction. NH keeps blowing up on me because I’m using NH.Linq and NH version

    What was the new project that you were referred to with a better, and refactored linq support? Just trying to find a way to use ISession.Linq() in NH ver.


  7. Daniel Guenter Says:

    Hi Tony,

    The official version NHibernate.Linq can be found here. This version is compiled against NHibernate 2.1GA and is not backwards compatible. The reason is that NHibernate 2.1 has a much better sql parser which allows easier composition of Linq queries. This was necessary to create a full featured Linq library for NHibernate.

Leave a Reply