{"id":518,"date":"2018-05-24T15:58:06","date_gmt":"2018-05-24T15:58:06","guid":{"rendered":"http:\/\/bruceng.com\/dev\/?p=518"},"modified":"2018-05-24T15:58:06","modified_gmt":"2018-05-24T15:58:06","slug":"nhibernate-unable-to-resolve-property-_namespace","status":"publish","type":"post","link":"https:\/\/bruceng.com\/dev\/?p=518","title":{"rendered":"NHibernate, Unable to resolve property _Namespace"},"content":{"rendered":"<p>This bug was reported and fixed before in earlier versions of NH(\u00a0https:\/\/nhibernate.jira.com\/browse\/NH-3234 ), but for some reason it resurfaced and hasn&#8217;t been fixed since (https:\/\/nhibernate.jira.com\/browse\/NH-3886)<\/p>\n<p>This happens when<\/p>\n<ul>\n<li>There is a one-to-many relationship between Parent and Child with cascading.<\/li>\n<li>A child has a many-to-one reference to parent in .hbm.xml mapping file.<\/li>\n<li>A transient entity of Parent has new transient entities of Child<\/li>\n<li>Performing Session.Merge(parent)<\/li>\n<\/ul>\n<p>The error thrown is in the format: Unable to resolve property: _Namespace. Where namespace is the first part of your namespace in the project.<\/p>\n<p>Somehow removing the many-to-one configuration from the Child entity hbm.xml file will stop NHibernate from throwing this error.<\/p>\n<p>Hopefully it will be fixed in the future versions of NH.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This bug was reported and fixed before in earlier versions of NH(\u00a0https:\/\/nhibernate.jira.com\/browse\/NH-3234 ), but for some reason it resurfaced and hasn&#8217;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 &hellip; <a href=\"https:\/\/bruceng.com\/dev\/?p=518\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;NHibernate, Unable to resolve property _Namespace&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[76],"class_list":["post-518","post","type-post","status-publish","format-standard","hentry","category-problems","tag-nhibernate"],"_links":{"self":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=518"}],"version-history":[{"count":1,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/518\/revisions"}],"predecessor-version":[{"id":520,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/518\/revisions\/520"}],"wp:attachment":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}