Asynchronously validates constraints for a given feature participating in a relationship.
public Task<RelationshipConstraintViolationType> ValidateRelationshipConstraintsAsync(ArcGISFeature feature)
A task that represents the asynchronous validation of relationship constraints operation. The value of the task result contains a RelationshipConstraintViolationType object.
The following are considered violations:
In a composite relationship, adding an orphan feature to the destination table without relating it to an origin feature.
- In 1:1 relationships, if an origin feature is already related to a destination feature, relating another feature to either of them.
- In 1:n relationships, relating a destination feature to more than one origin feature.
To recover from an orphaned destination feature violation, simply relate it to a valid origin feature. You can usually recover from a cardinality violation by unrelating the appropriate features. Also, see UnrelateFeature(ArcGISFeature).
Edit operations do not error when there are constraint violations. This allows you to recover from violations in a back office operation after applying edits or syncing, if you choose to do so. See ArcGIS Desktop Validate Features process here.
Note: This method makes network calls to query for the related features if they are not present locally. If you have just related the feature you are validating, you need to first call UpdateFeatureAsync(Feature) to reflect the modified attribute value in the table. If this is not done, validation results may be incorrect.
Platforms and versions
|.NET Standard 2.0||100.3 - 200.2|
|.NET 6.0||100.13 - 200.2|
|.NET 6.0 Windows||100.13 - 200.2|
|.NET 6.0 Android||200.0 - 200.2|
|.NET 6.0 iOS||200.0 - 200.2|
|.NET Framework||100.1 - 200.2|
|.NET 5||100.10 - 100.12|
|.NET Core 3.1||100.7 - 100.12|
|Android||100.1 - 100.15|
|iOS||100.1 - 100.15|
|UWP||100.1 - 200.2|