Activation strategies

.NET: 

configuration.ActivationDepth(activationDepth)

Advantage

Db4o default activation depth is 5. This setting gives you control over activation depth level depending on your application requirements.

Effect

The two extremes:

  • activationDepth = maximum integer value - will pop the whole object graph into the memory on every retrieved object. Can be a reasonable solution for shallow objects' design. No need to bother about manual activation;
  • activationDepth = 0 - will reduce memory consumption to the lowest level though leaving all the activation logic for your code.

Alternate strategies

If your object is not fully activated due to the default configuration settings you can activate it manually:

.NET: IObjectContainer#Activate(object,depth)

or use specific object settings:

.NET:

configuration.ObjectClass("yourClass").MinimumActivationDepth(minimumDepth)
configuration.ObjectClass("yourClass").MaximumActivationDepth(maximumDepth)
configuration.ObjectClass("yourClass").CascadeOnActivate (bool)
configuration.ObjectClass("yourClass").ObjectField("field").CascadeOnActivate(bool)

For more information on activation strategies see Activation chapter.