We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eab3471 commit 10a2534Copy full SHA for 10a2534
DataGateway.Service/Services/RequestValidator.cs
@@ -217,7 +217,10 @@ public static void ValidateUpsertRequestContext(
217
218
foreach (KeyValuePair<string, ColumnDefinition> column in tableDefinition.Columns)
219
{
220
- // Primary Key columns are validated separately.
+ // Primary Key(s) should not be present in the request body. We do not fail a request
221
+ // if a PK is autogenerated here, because an UPSERT request may only need to update a
222
+ // record. If an insert occurs on a table with autogenerated primary key,
223
+ // a database error will be returned.
224
if (tableDefinition.PrimaryKey.Contains(column.Key))
225
226
continue;
0 commit comments