AnsweredAssumed Answered

Relationship queries work differently on AGOL Hosted layers vs ArcGIS Server layers

Question asked by akmanchianand on Aug 4, 2015
Latest reply on Aug 4, 2015 by cwhitmore-esristaff

We have a polygon feature layer that is related to another point feature layer through a relationship class (1 to 1) defined at the geodatabase level. When a relationship query  (query related records) is executed at the rest end point of the polygon feature layer, I would expect the result to be a point feature.

This works fine when the feature layers are hosted on ArcGIS Server. However, when the feature layers are hosted on ArcGIS Online, I get a polygon result!

 

The same service definition file is used to publish the service on ArcGIS Server as well as ArcGIS Online, so the data structure is exactly the same.

 

Here are the relationship queries that you can execute and have a look at the results.

 

ArcGIS Server -

Query - https://csslesxi16-vm17.cybertech.com/arcgis/rest/services/Hosted/DC_pollingplaces_with_attachments/FeatureServer/1/quer…

Result - The relatedRecordGroups in output contains the correct point feature as expected. Now observe that the layer definition returned in the result is of type esriGeometryPoint. The fields reported in the layer definition are also of the point layer.

 

ArcGIS Online

Query - http://services1.arcgis.com/DlnuvLGpDczjeSgG/arcgis/rest/services/DC_pollingplaces_with_attachments/FeatureServer/1/quer…

Result - The relatedRecordGroups in output contains the correct point feature as expected. However, observe that the layer definition returned in the result is of type esriGeometryPolygon and the fields reported in the layer definition are of the point layer!

 

Looks like a bug in ArcGIS Online hosted feature services? or am i missing something?

 

I have also attached the service definition file if you'd want to quickly reproduce.

Outcomes