AnsweredAssumed Answered

How to limit child rows in replica with QueryOption?

Question asked by kor_ on Apr 22, 2015
Latest reply on Mar 14, 2017 by iljanen

We have an application that uses the .NET SDK to create offline replicas from ArcGIS Server. We need to get some very specific data to the replica so we're using the LayerQueries to tell the SDK what to get.


The problem is that, for one layer, the SDK seems to always get all the related rows no matter what the QueryOption is. The documentation says that QueryOption.UseFilter should ignore the IncludeRelated flag, but it doesn't seem to do so in our case.


I used Fiddler to capture the REST call to the ArcGIS server and the LayerQuery for our layer is (see the attachments for complete layerquery):

"22":{"where":"OBJECTID IN (15076)","queryOption":"useFilter"}


The layer in question is related to a parent table. If the parent table (layer 15) is added to LayerQueries, then all its related rows (layer 22) are added to the replica no matter what QueryOptions or IncludeRelated values I choose. You can see in the attached screenshot that the replica geodatabase contains more than one row for the layer 22.


So my question comes down to this: is there a way to limit the child rows when creating replica? And shouldn't the QueryOption and Where clause be enough to limit the child rows in the replica?