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(); } }
public Child(Parent parent) { parent.AddChild(this); }
public Child(Parent parent) { parent.AddChild(this); }