Here is my database schema:
Table OBJECT
id
Table OBJECT_VERSION
id
PrevVersionID
ObjectID
Here are my classes:
class Object
{
Object_version version;
}
class Object_version
{
Object_Version previous_version;
Object object;
}
How to map this in a way that I would be able to save new instances of
Object_Version and set reference to previous version, but when I load
Object, only 1 Object_version gets loaded (not others that are in a chain)?
How should mappings for Object and Object_Version look like?
|