Find container reference
Syntax
$object.containerReference()
Description
Returns the reference attribute where object
is stored in its container. If $object.container() != null
, then: $object.container().get($object.containerReference()).containsElement($object)
.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
object | Business object | The object for which it is to be determined in which reference attribute it is stored in the container. | yes |
Return value
Type: Business object
The reference attribute in the container of object
, where object
is stored.
Examples
{
a = new(`my.module:MyClass`);
b = new(`my.module:MyClass`);
$a.add(`my.module:MyClass#children`, $b);
$b.containerReference();
}
Output: The attribute `my.module:MyClass#children`
.
b
is entered here into the reference attribute children
of a
. a
is the container of b
and `my.module:MyClass#children`
is the reference attribute in the container a
, where b
is stored.