You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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?
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
The text was updated successfully, but these errors were encountered: