What is going on with NHibernate 2.0?

time to read 3 min | 464 words

Well, I haven't wrote anything about that in a while, and I am scanning the change log right now, and it looks like a lot have been going on.

Fabio Maulo has been going at it with gusto, and has ported several very big features, and I would like to take this opportunity to thank him for that. Karl Chu has been doing some really nice things as well, and deserve thanks as well. Awesome work, both of you.

Me, I am sitting in the corner with slack jaw and watching the feature pile on top of each other.

This is a partial list only, mind you, I am going over the log, but it contains over three hundred commits, and I am not that patient. I also put things here that I consider significant, which may means that I am missing some things that are important to others.

New & Exciting features:

  • CriteriaTransformer - allows to clone and transform ICriteria and DetachedCriteria.
  • Criteria inspection - improved the ability to see what it going on there, previously was write only.
  • Multi Criteria - the companion to Multi Query
  • <join> tables - allowing to compose a single¬†entity from several tables.
  • Events, Actions and Listeners - this is a very big feature, and it extends the way you can work with NHibernate in very deep ways. Think of it like the interceptor++.
  • Persistence Context - this is important for the internal NHibernate structure, it makes it much close to the Hibernate one, which in turn make it easier to share features.
  • list-index - adding the ability to specify the base index of a list, instead of always going from 0
  • property-ref - allow to have an association that is not based on the primary key on an entity
  • Stateless Session - easier way to work with bulk data, without needing the first level cache
  • Cache Mode - better control on how the session will work with the second level cache.
  • Statistics feature - useful for tests, and to see exactly what NHibernate is doing.
  • Query plan - NHibernate will parse named queries¬†in advance, which allows to do nice things, like provide tool support for them, beyond the perf implications
  • Update IInterceptor - now supports H3.2 methods and capabilities
  • <union-subclass> - like <join-subclass>, but with union instead of joins

Other changes:

  • Bug fixes
  • Using more .Net 2.0 features, generic collections throughout, etc.
  • CLS Compliant refactoring
  • Changing the internal processing of the XML processing to use a more easy to use serialized classes
  • Single consistent configuration schema, for both app.config and hibernate.cfg.xml
  • Updated NHibernate's proxies to use Castle's RC3

Again, this is partial list only, and I am covering the last 4 months only, but I am very pleased with what we have even so far...