Type to start searching...

Script

The script to execute when this update mapping is triggered.

Description

In the script, the following variables will be defined:

this: A single transfer object or a collection of transfer objects, depending on the value of the "batch" property.

properties: An instance of PropertyHolder that contains the properties from the .connections file for the current fragment.


On the transfer object, the following special attributes will be set:

:oid: The OID of the instance being updated.

:class: The string name of the class of the instance being updated (may be a sub-class of this class.)

:event: "update"

Additionally, there will be values in the transfer object for the attributes being updated. The attributes that are included in the transfer object are controlled by the "dirty" and "full" properties. Non-primitive attributes are set only if the attribute stores the association's foreign key. In this case, the value will be the OID of the associated instance.

The return value of this script is ignored. However, the transfer object will be examined after this script has finished execution. If the class has a locking attribute, then the locking attribute value on the instance will be set to the value in the transfer object.

If there is an optimistic locking error, this script should throw the exception using (throw-optimistic-lock <transfer-object>).

Properties
language : schemeLanguageType

The scripting language for this element.

The language defaults to scheme.
Valid values based on“languageType”.
scheme

scheme scripting language

Parents