db4o

IObjectContainer.Set Method 

newly stores objects or updates stored objects.

void Set(
   object obj
);

Parameters

obj
the object to be stored or updated.

Remarks

newly stores objects or updates stored objects.

An object not yet stored in the

IObjectContainer
will be stored when it is passed to
Set()
. An object already stored in the
IObjectContainer
will be updated.

Updates
- will affect all simple type object members.
- links to object members that are already stored will be updated.
- new object members will be newly stored. The algorithm traverses down new members, as long as further new members are found.
- object members that are already stored will not be updated themselves.
Every object member needs to be updated individually with a call to
Set()
unless a deep global or UpdateDepth update depth was configured or cascaded updates were CascadeOnUpdate or in CascadeOnUpdate .

Examples: ../com/db4o/samples/update.

Depending if the passed object is newly stored or updated, the callback method ObjectOnNew or ObjectOnUpdate is triggered. objectOnUpdate might also be used for cascaded updates.

See Also

IObjectContainer Interface | Db4objects.Db4o Namespace | IExtObjectContainer#Set(object, depth) | Db4objects.Db4o.Config.IConfiguration.UpdateDepth | UpdateDepth | CascadeOnUpdate | CascadeOnUpdate | ObjectCallbacks