What do you gain from upgrading NHibernate 1.2?

我与影子孤独终老i 提交于 2019-12-01 17:54:25

Off the top of my head and mixing 2.X and 3.0 features... LINQ support, EventListeners (more powerful Interceptors), System.Transaction support, generics support, multiquery, future queries, SchemaUpdate (rather than just SchemaExport), much better HQL parser, ... Plus numerous bug fixes. A lot has been going on in the NHibernate world since NH 1.2...

With the 3.0.0 release, NHibernate includes support for LINQ, along with additional features such as:

Along with a long list of bug fixes and improvements, it has several new features including

  • A new strongly typed criteria API called QueryOver
  • Lazy loading of columns
  • Alias delimiting in generated SQL
  • Support for DetachedCriteria within IStatelessSession.
  • Improved support for LINQ, overcoming the HQL limitations of the previous provider.

Breaking change:

  • Upgrading users should be aware that one of the fixes means that null values in dictionaries are no longer silently ignored, which has the potential to break existing application code.

James Kovacs summarized it pretty well, but for a complete list of changes check https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk/nhibernate/releasenotes.txt

It contains every single bug/improvement/new feature for all NH releases.

You get Linq support!

I started on 2.x+ so I can't say much...but I'll for sure upgrade to 3.0 once it's out of beta. Mainly because QueryOver looks like ICriteria on type safe steriods!

v3: Removal of the dependency on log4Net (which is often a love-it or hate-it thing)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!