Unversioned equality of subject objects
Syntax
$object1.equalsUnversioned($object2)
Description
The function tests if the given business objects are the same, regardless of their version.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
object1 | Business object | First business object for comparison | yes | |
object2 | Business object | Second business object for comparison | yes |
Return value
Type: True value
TRUE
if the two business objects represent the same object, even if they are in different revisions, FALSE
otherwise.
Examples
Example 1
{
$businessObject = ... ;
$businessObject.inRevision(revisionOfCommit(42)).equalsUnversioned($businessObject.inCurrent());
}
Output: TRUE
A business object in CURRENT is compared with revision 42 of this business object. These are equal.
Example 2
{
$businessObject = ... ;
$r42 = revisionOfCommit(42);
$r666 = revisionOfCommit(666);
$businessObject.inRevision($r666).equalsUnversioned($businessObject.inRevision($r42));
}
Output: TRUE
Here the same business object is compared in different historical states. These are equal.