As soon as Fabio said NHibernate 2.1 has been released I rushed to see what's new. Here's what I found so far:
- NH now supports Dependency Injection of hibernate managed objects. See this, this, and this for specific examples for Spring and Windsor.
- Also related is the new pluggable architecture of Proxy providers, so you're no longer tied to CastleDynamicProxy. You can now choose between Castle, Spring.AOP and LinFu. In fact you must choose one using the new proxyfactory.factory_class setting.
- NH's new HQL parser is based on ANTLR. This allowed for many HQL improvements, like the new with clause, plus a lot of invisible changes in preparation for real LINQ2NH support.
- Support for executable bulk queries, like delete all, or copy all from table A to table B
- New MSSQL 2008 dialect
- Support for new SQL Server 2008 data types such as Date, Time and DateTimeOffset
- Support for varbinary(max) FILESTREAM option, new to SQL Server 2k8. Follow the links in this thread for instructions on how to configure and use it with NH.
- New identity generators, seems to be most useful for MySql and Oracle backends
- My personal favorite: Greatly simplified multiqueries through Future<T> query support
- New entity-name mapping for advanced polimorphic mapping
- Support for using .NET's native HashSet<T> instead of Iesi.Collections.Set for <set> mappings
- Separate configuration for second-level cache (outside of class mapping files)
- Support for duck typing
- Distributed transactions support
- Built-in generic EnumString mapping
- The Generate Statistics bug fixed!
- Whole bunch of other cool but very obscure improvements and bug fixes
- Performance optimizations, particularly SessionFactory initialization should be faster
- NHibernate.Caches 2.1 has also been released, includes some minor bug fixes
- Support for NHibernate Validator 1.2
- Auto-quoting of table/column names that use reserved keywords
- The icing on the cake: NHibernate Linq 1.0 has been released!
- NEW: prepare_sql is set to true by default. This affects the way parametrized queries are generated and executed. See my detailed blog post for the history of this controversial issue.
For a full list of changes, see NH 2.1 release notes
Tags: