public virtual void AddChild(Child child) { if (children == null) { children = new HashSet<Child>(); } children.Add(child); }
public void Bug() { Parent p; Child c; using (ISession s = OpenSession()) { p = new Parent(); s.Save(p); c = new Child(p); s.Save(c); s.Flush(); } using (ISession s = OpenSession()) { s.Delete(c); s.Delete(p); s.Flush(); } }