【发布时间】:2011-01-17 10:06:33
【问题描述】:
我有:
static class Db4o...
和:
class Db4oBase... // which uses Db4o class
我可以:
class Customer : Db4oBase
{
public Customer(string name)
{
}
}
这样我可以:
Customer customer = new Customer("Acbel Polytech Philippines");
customer.store(); //something like that
它起作用了,直到在我开发的某个时候,下面的代码突然出错了:
class Db4o
{
.
.
.
public static IObjectSet Retrieve(object obj)
{
IObjectSet objectSet = null;
objectSet = container.Ext().QueryByExample(obj); // This part of the code
// throws a unsupported
// class hierarchy.
return objectSet;
}
}
QueryByExample 指令引发不受支持的类层次结构。有人知道我该怎么办吗?
【问题讨论】:
-
曾经改变过继承层次吗?因为 db4o 不支持。当 db4o 检测到类层次结构发生变化时,就会抛出这个异常。
-
@Gamlor 我不记得更改继承层次结构。
标签: c# database-design object db4o object-oriented-database