How to limit child rows in replica with QueryOption?

2442
1
04-22-2015 05:41 AM
JuhoVainio
Occasional Contributor

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?

0 Kudos
1 Reply
IljaVanhanen
New Contributor

Hi,

have you been able to resolve or work around this? I'm facing the same problem with Layerqueries, where the child table's LayerQuery seems to completely ignore the where-clause and all other options for that matter if the parent table also exists in layer queries; and take all related rows instead.

0 Kudos