我是 db4o 的新手,我正在尝试弄清楚是否可以执行以下操作:
public class Page
{
public Guid ID {get;set;}
public Page Parent {get;set;}
public IList<Page> Children {get;set;}
public String Name {get;set;}
public String Depth {get;set;}
}
当我保存页面时,我只有它的父级。IE
Page p1 = new Page() {
ID = Guid.NewGuid(),
Name = "p1",
Parent = null
};
Page p2 = new Page() {
ID = Guid.NewGuid(),
Name = "p2",
Parent = p1
};
Page p3 = new Page() {
ID = Guid.NewGuid(),
Name = "p3",
Parent = p1
};
当我加载 p1 时,无论如何都要填充两个孩子?