开发者

Is the book "NHibernate in Action" for V1.2 of NHibernate still relevant in October 2009?

Manning is running a special on "NHibernate in Action" for $10. NHibernate In Action was released in February 2009 for V1.2 of NHibernate. Currently, NHibernate is up to V2.1. Will the book about V1.2 be relevant enough to apply towards the current release of NHibernate. I don't want to waste my time an开发者_Python百科d money on a book about deprecated or irrelevant features.

I'm a complete NHibernate noob, but I'm not a stranger to the general concept of ORM's.

Update:

I did buy the book, and from the small amount that I've read the V2.x series was in beta when the book was released. The book's authors do point out some of the differences in configuration between 1.x and 2.x. From what I've read so far, I recommend this book to anyone wanting a book about NHibernate.


Yes, it will still be relevant. You can find core definitions about ORM systems in it.

Also there are a lot of examples about mapping and solving common problems like inheritance mapping, collections mapping, caching, etc.


After some digging I found this post, which linked to this blog, which actually gave a few bits of detail on NH2.1 but no sales pitch. This is the main problem NHibernate has in my view - they don't go for selling themselves in a big way but like to "keep it in the family", you have to dig through developer's blogs.

Anyway the release notes is where you're told to look. releasenotes.txt contains the entire history and here's some pickings from 2.0 and 2.1:

  • .NET 1.1 is no longer supported
  • Nullables.NHibernate is no longer supported (use nullable types of .NET 2.0)
  • NHibernate.Expression namespace was renamed to NHibernate.Criterion
  • <nhibernate> section, in App.config, is no longer supported and will be ignored. Configuration schema for configuration file and App.config is now identical, and the App.config section name is:
  • <hibernate-configuration> have a different schema and all properties names are cheked
  • configuration properties are no longer prefixed by "hibernate.", if before you would specify "hibernate.dialect", now you specify just "dialect"
  • NHibernate will return long for count(*) queries on SQL Server
  • Various classes were moved between namespaces
  • Various classes have been renamed (to match Hibernate 3.2 names)
  • AutoFlush will not occur outside a transaction - Database transactions are never optional all communication with the database must occur inside a transaction, whatever you read or write data. (This one may affect what you read in the book, see this question)
  • case when...then...else...end in select clause

There are around a hundred others but nothing that will affect you if you're not trying to upgrade from 1.2 to 2.1.


I've just bought the book, and am finding it very useful and relevant. Much of the important stuff is conceptual anyway. My bigger gripe is the fact that I'm using fluent nhibernate, so lots of the xml and attribute mapping and config stuff in the book is not so relevant to me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜