There is indeed an issue with editing tables that are not feature layers at the current release of the Qt Runtime SDK.
So for anyone interested, our solution was to add (fake point) geometry to the flat table so we could expose it as a feature layer in the REST service. Within the Qt code, I use the table and make it a (fake) feature layer that never gets added to the map.
//initialize the fake feature layer from the table and initialize the layer
someTable.url = someRESTEndpointUrl;
someTableFakeFeaturelayer.featureTable = userTable;
someTableFakeFeaturelayer.initialize();
When the feature layer’s status changes to LayerStatusInitialized, I run a query to get the data I want to update:
if (someTable.featureTableStatus === Enums.FeatureTableStatusInitialized) {
//run a query to download the data we want from the service
userQuery.where = aQueryString;
someTable.queryServiceFeatures(userQuery);
}
And when the table’s QueryServiceFeaturesStatusChanged === QueryFeaturesStatusCompleted, I update the feature records that are returned and then finally apply the edits to the table:
var iterator_edits = queryServiceFeaturesResult.iterator;
var thisRecord;
while (iterator_edits.hasNext()) {
//update some information
thisRecord = iterator_edits.next();
thisRecord.setAttributeValue(m_NameOfAttribute, newValue);
//apply the edits to the feature (i.e., this data record)
updateFeature(thisRecord.uniqueId, thisRecord);
}
//apply the edits to the table
someTable.applyFeatureEdits();
And everything updates as expected.
Thanks for the insight on this Lucas!