Method ValidateRelationshipConstraintsAsync
ValidateRelationshipConstraintsAsync(ArcGISFeature)
Asynchronously validates constraints for a given feature participating in a relationship.
Declaration
public Task<RelationshipConstraintViolationType> ValidateRelationshipConstraintsAsync(ArcGISFeature feature)
Parameters
Type | Name | Description |
---|---|---|
ArcGISFeature | feature | The feature. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<RelationshipConstraintViolationType> | A task that represents the asynchronous validation of relationship constraints operation. The value of the task result contains a RelationshipConstraintViolationType object. |
Remarks
The following are considered violations:
In a composite relationship, adding an orphan feature to the destination table without relating it to an origin feature.
Cardinality Violations:
- 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.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.1 - 200.6 |
Xamarin.Android | 100.1 - 100.15 |
Xamarin.iOS | 100.1 - 100.15 |
UWP | 100.1 - 200.6 |