Select to view content in your preferred language

Retrieve records from related table in ArcGIS Runtime SDK for Android

1064
2
10-27-2017 12:44 AM
deleted-user-M6rwsXZZL0Hq
Deactivated User

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.

OBJECTIDF_ID_NODET_ID_NODESHAPE 
1100101PolyLine


And the the table of vertex has some atrributes like type:

OBJECTIDID_NODETYPESHAPE
11001POINT
21012POINT


And i've created 2 relationship classes

Here is the relashionship class properties:

Relationship Classvertex_segments_f_rel
TypeSimple
CardinalityOne to one
NotificationNone
Origin Namevertex
Origin Primary KeyID_NODE
Origin Foreign KeyF_ID_NODE
Destination Namesegments
Forward Path Labelsefementsf
Backward Path Labelvertexf

Relationship Classvertex_segments_t_rel
TypeSimple
CardinalityOne to one
NotificationNone
Origin Namevertex
Origin Primary KeyID_NODE
Origin Foreign KeyT_ID_NODE
Destination Namesegments
Forward Path Labelsefementst
Backward Path Labelvertext

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!!

0 Kudos
2 Replies
AlexanderNohe1
Honored Contributor

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.

MikeWilburn
Esri Contributor

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