When working in TA enabled environment you must remember that db4o treats Activatable (TA Aware) and non Activatable (other) types differently.
In general we can distinguish the following types:
As it was mentioned before in TA enabled mode non-Activatable types are fully activated whereas Activatable types have 0 activation depth and are getting activated as requested.
Let's look at an example model below, which includes Activatable and non-Activatable classes:
Querying and traversing in TA enabled mode:
c#:
Customer c =
container.QueryByExample(typeof(Customer)).Next();
VB:
Dim c as Customer =
container.QueryByExample(GetType(Customer)).Next();
At this point the following paths should be already activated (Customer is not Activatable):
c.name
c.addresses
.addresses[N].firstLine
c.addresses[N].country
- available but not activated (Activatable type).
Country.getState would cause the Country object to be activated
c#:
State state = c.Address[0].Country.GetState(someZipCode);
VB:
Dim state As State =
c.Address(0).Country.GetState(someZipCode);
At this point the following paths become activated
c.addresses[0].country.states
.addresses[0]
.country.states[N].name
c.addresses[0].country.states[N].city
.addresses[0]
.country.states[N].cities[N]
- available but not activated (Activatable type)
The following general rules apply: