I'm using a client side data source on a feature layer
When calling applyEdits with addFeatures specified, the object Id field on the feature layer definition and therefore the value set on the graphics attributes is not being honored when the features are added.
See this codepen for an example: https://codepen.io/anon/pen/BqvEPm?editors=1010
Two features with objectIds set in the attributes are passed to applyEdits(), but when being added the object Ids are automatically calculated by incrementing the max existing object Id and the attribute value is disregarded.
You can see it in the console or in the popup for the features in the example. The delete button won't delete anything as the object ids don't match anymore.
This feels like a bug, or is it by design?
If a bug, any known workarounds?
I haven't tried it on a layer with a service source, as it seems specific to MemorySourceWorker though I'm guessing a service source is probably ok.