NHibernate Migration Guide: From 1.0 to 1.2

time to read 2 min | 300 words

Billy McCafferty may have intended just to give a sample of how to move from NHibernate 1.0 + my NHibernate.Generics to NHibernate 1.2, but his post is actually a very good guide about migrating in general from 1.0 to 1.2.

The part that you really want to do is in the end, where you want to verify that:

  • Do updates to a child, via the parent, still work?
  • Do creations of new children, added to the parent, persist to the database?
  • Do deletions of existing children from the parent, or by deleting the child directly, work correctly?
  • Have other CRUD, cascade scenarios been tested?

I have said it before, I trust NHibernate to manage my objects, but I want to verify that what I think the mapping are, and what they are actually doing are the same. Cascading and lazy loading are two of the most important parts that you want to verify when you migrate, and you really should make sure that you have working tests before you do it. For the rest, check out Billy's post.