Updated the NHibernate implementation.