While trying to build a workaround for the lack of related table/feature support in 100.0.0 I found that I'm not able to set any GUID field values. The goal is to set the foreign key value for a feature to the GlobalID value of its related feature in the geodatabase in code. My relationships are all 1-M in the geodatabase.
On the coding side it works just fine until I perform the following:
var saveResults = await table.SaveChangesAsync();
Where table is a ServiceFeatureTable.
In my many iterations, I found that the following do not work:
- GUID fields cannot be unassigned/null, so I have to put something in there.
- Setting the value to a valid GlobalID value fails.
- new Guid() (i.e. no related feature) also fails.
I get an ArcGISWebException error "Unable to complete operation" with the detailed message "Setting of value for DeviceID failed." for all non-null values. Null/unassigned values just fail because GUIDs cannot be null.
I'm using the ArcGIS Server 10.5.0 (build 6491), Windows Server 2012 R2, and SQL Server 2014 on the backend, all with the latest updates.
This is the final piece of the puzzle to complete my project. Any help would be greatly appreciated.