示例#1
0
		public virtual void AddChild(Child child)
		{
			if (children == null)
			{
				children = new HashSet<Child>();
			}
			children.Add(child);
		}
示例#2
0
		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();
			}
		}