In order to work effectively with db4o you must understand the concept of Activation. Activation controls the amount of referenced objects loaded into the memory. There are 2 main pitfalls that you must be aware about:
An object retrieved from the database is null.
This happens if the activation level is lower than needed. For example:
class Pilot has field Car:
Pilot {
Car car;
}
and is saved to a database. Then
pilot
object us retrieved from the database with the
activation depth is set to 0. In this case pilot.car
will be equal to null and can be incorrectly interpreted.
Activation depth is set globally to a high value or is set to cascadeOnActivate for a heavily used object with a deep structure. This will result in a huge performance penalty and should be avoided.
The automatic solution of the Activation issues is provided by Transparent Activation Framework. However, understanding of Activation is still important.
For more information on activation see: