upsert operation
This is not an issue but a query. How can we test for upsert operation? I found method for insert/update and delete but not sure how to check for upsert
@vinniks29 We also needed upsert operation. We are working on implementing it. If possible we will send a pull request for this. :)
I've implemented a custom version of upsert for ESAPI. One of the challenges way around how you define the whitelist of applicable fields to upsert.
I found that if the underlying operation turns into an insert you need to verify against one set of fields. In turn, if it is an update you need a different set of fields as some fields can only be inserted but not updated. It was a bit ugly, but I found I needed to pass through both sets of field names and then determine which to apply based on the ID being present.
However, that doesn't help you if you are upserting based on an external ID. How do you know if you are doing an insert or update without first checking if the record already exists?