I have a problem with querying related data.
I have a FeatureService with 4 feature layers and 2 feature tables.
0 (layer) is Related with 4 (table)
1 (layer) is Related with 4 (table)
2 (layer) is Related with 4 (table)
3 (layer) is Related with 4 (table)
4 (table) is Related with 0 (layer), 1 (layer), 2 (layer), 3 (layer)
5 (table) is Related with nothing
There is a situation when one feature from 4 (table) is a parent of 0 (layer) and another feature from 4 (table) is a child of 0 (layer).
I created replica using queryOption: all to make sure that I download all features.
Then I wanted to query related records.
IReadOnlyList<GeodatabaseFeature> features = await table.QueryRelatedAsync(featureID, relation.ID);
Almost everything works fine, but there are the Exceptions thrown when querying
layer (0), and table (4).
I got two kinds of Exceptions:
One with message: Item not found in the database. (Table, domain, relationship class, etc.) :
And another: system.runtime.interopservices.sehexception external component has thrown an exception
Is these something that I'm doing in wrong way?
Thanks,
Matt.
Here is my Service for better understanding
http://149.202.73.37/arcgis/rest/services/PKPEnergetyka/ProstyModel2/FeatureServer
I have made some progress.
1. "sehexception..." disappeared after I updated my runtime to version 10.2.7
Release notes for 10.2.7—ArcGIS Runtime SDK for .NET | ArcGIS for Developers
GeodatabaseFeatureTable.QueryRelatedAsync
throws SEHException.2. I had response from Esri Support that Item not found in the database Exception is registered as a "BUG-000095159: ArcGIS Runtime QueryRelatedAsync method returns Exception: Item not found in the database"
3. I discovered that Item not found in the database. (Table, domain, relationship class, etc.) : exception shows in two cases:
a) When there are relationships m:n (Many to Many).
b) When I use ''looped" relationships. For Example Feature 1 from Table TableA is related to Feature 2 from TableB, and in the same time, Feature 2 from TableB is related with Feature 3 from TableA.