NHibernate configuration for uni-directional one-to-many relation
NH3 and above allow to correct save entities in case of uni-directional one-to-many mapping without annoying save null–save–update cycle, if you set both not-null=”true” on <key> and inverse=”false” on <one-to-many> FluentNHibernate code snippet for that: public class MasterMap : ClassMap<Master> { public MasterMap() { Id(x => x.MasterId); Map(x => x.Name); HasMany(x => x.Details) .Not.Inverse() //these … Read more