Fluent NHibernate one-to-many relationship setting foreign key to null
问题 I have a simple Fluent NHibernate model with two related classes: public class Applicant { public Applicant() { Tags = new List<Tag>(); } public virtual int Id { get; set; } //other fields removed for sake of example public virtual IList<Tag> Tags { get; protected set; } public virtual void AddTag(Tag tag) { tag.Applicant = this; Tags.Add(tag); } } public class Tag { public virtual int Id { get; protected set; } public virtual string TagName { get; set; } public virtual Applicant Applicant {