Linq update

October 8th, 2008

About a week ago NHibernate 2.0.1GA was released, but I haven’t had a chance to compile NHibernate.Linq against it until now.  So if you are still looking to run the old version of NHibernate.Linq with NHibernate 2.0.1GA here are the files.

NHibernate.Linq for 2.0.1GA

I wasn’t sure that anyone was aware of this little project until I got a linkback from Ayende’s blog.

Of course I’m still waiting anxiously for the real Linq version that is being developed in the main trunk to mature as it looks like a far better stabler implementation.

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.

Posted in Misc | 7 Comments »

Riding out the bumps

August 14th, 2008

Sometimes a person just has to wait for things to settle down before work can be done.  In this case I’m talking about NHibernate 2.0.  I had been building off of the latest stable release, beta 1, 2, CR1 etc…  However beta 2 seriously broke a bunch of things I’ve been working with as well as Linq support and I’m not sure yet what they intend on doing about it. For instance the latest stable release CR2, has added quite a few new methods to the ICriteria interface that is heavily used by both myself and Linq.  One would think that I could just add those methods into the classes that implement them and be done with it, however there is a further snag.  The latest SVN source of NHibernate (I would assume this is what NH 2.0 is being developed from) contains an ICriteria interface that is totally different than the one in CR2.  So which version is out of date and which one should I use?

Long story short, I’m going to have to wait a bit for the dust to settle before I can reliably continue building against NH 2.0.  Ahh but that’s the open source life.

The summer air is getting warmer and I’d rather be outside than inside coding.  However that hasn’t stopped work on NHibernate.Remote.  Several major changes are in the works and should be out shortly.

1) The generic messaging layer has been improved, unit tests and documentation have been added.  It is also now much faster.

2)Support for Criteria Queries and hopefully Linq is being added.

3)Better support for saving entities  with non Guid keys.

So if you have been wanting to give this a try,  you may want to wait a week untill the next version comes out.

I’ve been spending the last week bug fixing and cleaning up the GenericMessaging library for release.  If you don’t know what it’s all about go and check it out.  If the front page does not explain it well enough for you then check out the documentation as there are a lot more information and examples in there.