This bug was reported and fixed before in earlier versions of NH( https://nhibernate.jira.com/browse/NH-3234 ), but for some reason it resurfaced and hasn’t been fixed since (https://nhibernate.jira.com/browse/NH-3886)
This happens when
- There is a one-to-many relationship between Parent and Child with cascading.
- A child has a many-to-one reference to parent in .hbm.xml mapping file.
- A transient entity of Parent has new transient entities of Child
- Performing Session.Merge(parent)
The error thrown is in the format: Unable to resolve property: _Namespace. Where namespace is the first part of your namespace in the project.
Somehow removing the many-to-one configuration from the Child entity hbm.xml file will stop NHibernate from throwing this error.
Hopefully it will be fixed in the future versions of NH.