If I try to delete features from either ServiceGeodatabase or ServiceFeatureTable I get an error like:
Object ID '885192' is not valid.
Adding and modifying features works. Also, if I go to hosted layer's REST web interface (at `https://<domain>/server/rest/services/Hosted/<service>/FeatureServer/<table>/applyEdits`) I can delete features, so I assume delete operation is permitted.
What I did notice by stepping through the generated request in ArcGIS Runtime for Java is that it seems like objectid(s) are serialized as string, not as long. I looked at mParams in com.esri.arcgisruntime.internal.io.handler.request.HeadersAndBytesRequest constructor and I can see three parameters being used for applying single delete operation:
deletes -> ["885192"]
rollbackOnFailure -> true
f -> json
Assuming this is deserialized as JSON, it's clear that `deletes` holds an array of strings (instead longs).
Since HTTP request to API backend is built within native code and my ArcGIS installation is on HTTPS (so no Wireshark either), I couldn't verify this, so I'm asking here.
Details:
ArcGIS Runtime: 100.14.1
Java: OpenJDK 17
OS: Ubuntu 22.04 amd64
Hi,
I took a look through the code and the strings object IDs you see are further processed before being sent to the server. So, while there might be a problem I don't think it is related to processing the parameters.
I was wondering if you were trying to delete a feature newly created by apply edits and the object ID from the local feature object doesn't match the one in the table. You may need to call `Feature.refresh()` so that the OID of your local feature is updated to match that in the table. This isn't my area of expertise but I'm sure a colleague post with better information if this is wrong.
Colin