Hello everyone!
I have a problem with querying related data.
I've created a Mobile Map Package (mmpk) with twolayers.
One layer has lines segments and the other the vertex of those lines
The table of the segments layer has the ids of his vertex.
OBJECTID | F_ID_NODE | T_ID_NODE | SHAPE |
---|---|---|---|
1 | 100 | 101 | PolyLine |
And the the table of vertex has some atrributes like type:
OBJECTID | ID_NODE | TYPE | SHAPE |
---|---|---|---|
1 | 100 | 1 | POINT |
2 | 101 | 2 | POINT |
And i've created 2 relationship classes
Here is the relashionship class properties:
Relationship Class | vertex_segments_f_rel |
---|---|
Type | Simple |
Cardinality | One to one |
Notification | None |
Origin Name | vertex |
Origin Primary Key | ID_NODE |
Origin Foreign Key | F_ID_NODE |
Destination Name | segments |
Forward Path Label | sefementsf |
Backward Path Label | vertexf |
Relationship Class | vertex_segments_t_rel |
---|---|
Type | Simple |
Cardinality | One to one |
Notification | None |
Origin Name | vertex |
Origin Primary Key | ID_NODE |
Origin Foreign Key | T_ID_NODE |
Destination Name | segments |
Forward Path Label | sefementst |
Backward Path Label | vertext |
When i try to retrieve the related features with the SDK i have next error:
Exception occurred: com.esri.arcgisruntime.ArcGISRuntimeException: Item not found in the database. (Table, domain, relationship class, etc.)
I used the same patern listed here :
https://github.com/Esri/arcgis-runtime-samples-android/tree/master/list-related-features
The thing is. When i use only one relationship it works.
Maybe I'm missing something.,Its posible to do that or is a bug?
In ArcGis Pro the relations works as expected
An idea?
SDK Version : 100.1.0
Thanks!!
I believe this is a defect... I would reach out to your local esri distributor to get this logged as such. They can then provide you a defect number to track the status of this defect so you can be alerted when it is addressed.
Hi Jorge Balbuena. Thank you for pointing this out. This is in fact a defect. Can you indicate how pressing an issue this is to being resolved?
An immediate option for getting this to work is to model the relationship differently. Instead of relating vertices and segments via two one-to-one relationships, you can instead relate them with a single many-to-many relationship.
Presuming that I am understanding your premise correctly (a single line segment feature may relate to one or more point vertex features, and a single point vertex feature may relate to one or more line segment features), this would entail populating an intermediate table that identifies which origin vertex features relate to which destination segment features.
If this would be useful to you, check out this help article on how to do that: Populating an attributed relationship class table (intermediate table)—Help | ArcGIS Desktop