🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
OCLOperators brokenConstraints
Created by Lars.olofsson on 2018-12-14 · Last edited by Vale.buyondo on 2026-01-10.

Returns a collection of the names of broken constraints for the class and object.

Example

Complaint.allinstances->first.brokenConstraints

What this does

  1. Complaint.allInstances → all Complaints
  2. ->first → one concrete instance
  3. .brokenConstraints → violated constraints for that instance

Returns only violated constraints

Result is a collection (possibly empty)

See also: Constraints, OCLOperators constraints