c# - Many-to-One Mapping in NHibernate Not Working? -
i have following example persistent classes: using nhibernate.mapping.attributes; namespace gumidal.domain { [class] public class foo { [id(0)] [generator(1, class="identity")] public virtual int id { get; set; } [property] public virtual string name { get; set; } } [class] public class bar { [id(0)] [generator(1, class = "identity")] public virtual int id { get; set; } [manytoone(name="foo")] public virtual foo foo { get; set; } } } serializing assembly creates following xml: <!-- generated nhibernate.mapping.attributes on 2015-10-02 13:08:49z. --> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <class name="example.domain.foo, exampleassembly"> <id> <generator class="identity"/> </id> <property name="name...