OCLOperators equal to
Created by Charles on 2025-11-18 · Last edited by Colline.ssali on 2025-12-31.
Symbol (=)
The = operator is a comparison operator used to check whether two values are equal. It returns a Boolean result (true or false) and is commonly used in OCL constraints, validations, and conditional expressions.
Example:
self.Status = 'Active'Here is an example that uses a Department collection to check a department name with the OCL equal-to (=) operator:
Department.allInstances->collect(x|x.DepartmentName='Legal')or
Department.allInstances->exists(d | d.DepartmentName = 'Legal')The equality operator (=) is used to compare each Departmentâs DepartmentName against a specific value within a Department collection.
Results
