Geometry gets modified when updating only attribute data

2370
0
08-22-2014 05:39 AM
JoniNevalainen
New Contributor

Using ArcGIS Runtime for Windows Mobile 10.1.

We are trying to update attribute data of features and somehow the geometry gets also updated when we save the changes to the mobile cache and synchronize them back to the database. If I update multiple features, all previously updated features get the geometry of the feature that was last updated.

Here is an example code which reproduces the issue. The firstRow gets the geometry of secondRow when the data is synchronized back to the database. In mobile cache everything seems to be correct, atleast I can see the features correctly on the map and select them. And also the attribute data is correctly synchronized.

int firstId = 2105650708;

int secondId = 2105650709;

MobileCache mobileCache = new DatabaseService().mobileCache;

FeatureSource source = mobileCache.FeatureSources["TABLE"];

FeatureDataTable firstDt = source.GetDataTable(new QueryFilter(

    String.Format("{0} = {1}", Columns.OBJECTID, firstId)));

FeatureDataRow firstRow = firstDt[0];

firstRow[Columns.DESCRIPTION] = "FIRST";

firstDt.SaveInFeatureSource();

FeatureDataTable secondDt = source.GetDataTable(new QueryFilter(

    String.Format("{0} = {1}", Columns.OBJECTID, secondId)));

FeatureDataRow secondRow = secondDt[0];

secondRow[Columns.DESCRIPTION] = "SECOND";

secondDt.SaveInFeatureSource();

Has anyone experienced anything similar?

0 Kudos
0 Replies