I'm learning db4o data base, I'm planing to use it 3-tier project.
I don't fully understand the concept of object identity in db4o.
Suppose we have a class like this:
public class User
{
public Guid Id;
public String SomeString;
public Int64 SomeInt;
public DateTime SomeDate;
public DateTimeOffset SomeDateOffset;
public TimeSpan SomeTimeSpan;
public User SomeUser;
}
I have load object of type User from the DB and changed all it's members to new instances. How Db4o will determine what to do with members, when to update (replace) and when to store new instance of them?
According to manual and identity concept, my root object reference remains the same so the root object is updates, all member objects have a new reference so it inserts new instances of them, but in this case we have a space leak, old instances of types String, DateTime, TimeSpan, User etc remains in DB.
We can assume that it deletes objects that get orphaned (is not referenced by anyone), but what about root User object it's not referenced by anyone, what if I have stored pure DateTime object or Int32 object? Will it flag such explicitly stored object from beeing "GarbageCollected"? This is all just my assumtions, can someone explain how this actually all works?