Type to start searching...

Script

The script to execute when this create 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 created, if a key generator is being used.
         Otherwise, this OID will be () and it is the responsibility of this
         script (or the external system) to generate the OID. The generated OID
         will be communicated back to the framework by setting :oid.

:class: The string name of the class on which 'new was invoked (may be a sub-class
         of this class.)

:event: "create"

Additionally, there will be one value in the transfer object for every
primitive attribute on the class with an attribute mapping. 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 special attribute :oid is
not (), then the instance OID will be set to that value. Also, if the class
has a locking attribute and the transfer object has a key whose name is the same
as the locking attribute, then the locking attribute value on the instance
will be set to the value from the 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