Reputation: 8826
I have:
static class Db4o...
and:
class Db4oBase... // which uses Db4o class
where I can:
class Customer : Db4oBase
{
public Customer(string name)
{
}
}
so that I can:
Customer customer = new Customer("Acbel Polytech Philippines");
customer.store(); //something like that
It worked, until sometime in my development, the code below suddenly bugged down:
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;
}
}
The QueryByExample instruction throws an unsupported class hierarchy. Does anybody know what should I do?
Upvotes: 1
Views: 901
Reputation: 8081
Somehow your class hierachy has changed -- which is not directly supported by db4o. What ever happend, you have the following options (from db4o docs):
Upvotes: 1
Reputation: 2104
It happened when you:
yes, Hierarchy (inheritance) is supported but change it is not so simple to apply on existent file.
Upvotes: 2
Reputation: 8826
Okay this is what I did to remove the exception. I just created another clean database file. But I haven't find out what is the root cause that led to that error. No time for that yet. But it removed the "Unsupported class hierarchy change" exception. So if any of you encountered this you might want to try doing what I've done but if you know the root cause, please post it here as an answer. Thanks.
Upvotes: 0