API Reference > ecschema-Metadata > Metadata > RelationshipConstraint > classCompatibleWithConstraint classCompatibleWithConstraint MethodStatic Indicates if an ECClass is of the type or applies to the type (if a mixin) of the ECClass specified by the constraintClass parameter. classCompatibleWithConstraint(constraintClass: ECClass, testClass: ECClass, isPolymorphic: boolean): Promise<boolean> Parameter Type Description constraintClass ECClass The ECClass that is a constraint class of a relationship. testClass ECClass The ECClass to check against the constraint class. isPolymorphic boolean Indicates if the testClass should be checked polymorphically. Returns - Promise<boolean> Defined in core/ecschema-metadata/src/Metadata/RelationshipClass.ts Line 355 Last Updated: 11 June, 2024