queryRelatedRecords - must relates use objectid only?

397
2
03-19-2013 09:14 AM
by Anonymous User
Not applicable
Hello all,

I just have a general question about querying related records from a feature layer in a map or feature service (i.e., using the queryRelatedRecords REST API : http://resources.arcgis.com/en/help/rest/apiref/ms_dyn_queryrelatedrecords.html).

When I do this using a relate that is based on objectid fields, everything works fine.  But if I'm using a relationship that joins two tables based on globalids, I never get any results.

Are relationships using globlalids (or any other fields) supported?  I haven't found any documentation that indicates that the relationship class must be of a given type, or use specific fields or properties.

When I tested this, I tried using a variety of combinations of objectid and/or globalid values in the 'objectIds' parameter of the queryRelatedRecords request.  So far, I only got it to work when with regular objectid values, and when the relationship class used to link the tables is based on their objectid fields.

In the meantime, it looks like it'll be easier for me to just do a regular query directly on the related table.

Thanks in advance for any insight into this.
Tags (2)
0 Kudos
2 Replies
ThomasColson
MVP Frequent Contributor
I have the same problem: relating any tables on fields using GUID's, is not visible to ArcGIS server. Shows up in the REST directory with a relationship ID, but cannot query across the relationship. Kinda wish ESRI would have included this restriction in the help documentation. Adding objectID's to these tables is not an option or a workaround.
0 Kudos
nicogis
MVP Frequent Contributor
I think  (I do same in my soe) that Esri uses behind coarse-grained ao method 's MapServer http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/0012/0012000009n1000000.htm (QueryRelatedRecords) so seeing in help create a unique, not null, indexed numeric field in your table (not gdb) and the field will be recognized as a pseudo ObjectID field and so ...
0 Kudos