[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

newly stores objects or updates stored objects.

Namespace: Db4objects.Db4o
Assembly:   Db4objects.Db4o (in Db4objects.Db4o.dll)

Syntax

Visual Basic (Declaration)
Sub Set ( _
	obj As Object _
)
C#
void Set (
	Object obj
)
Visual C++
void Set (
	Object^ obj
)

Parameters

obj
System.Object
the object to be stored or updated.

Remarks

newly stores objects or updates stored objects.

An object not yet stored in the
 Copy imageCopy Code
IObjectContainer
will be stored when it is passed to
 Copy imageCopy Code
Set()
. An object already stored in the
 Copy imageCopy Code
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
 Copy imageCopy Code
Set()
unless a deep global or class-specific update depth was configured or cascaded updates were defined in the class or in one of the member fields .

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

IExtObjectContainer#Set(object, depth)
Db4objects.Db4o.Config.IConfiguration.UpdateDepth
Db4objects.Db4o.Config.ObjectClass.UpdateDepth
Db4objects.Db4o.Config.ObjectClass.CascadeOnUpdate
Db4objects.Db4o.Config.ObjectField.CascadeOnUpdate
Using callbacks