Skip to content

Commit 534c240

Browse files
authored
fix: exclude identity columns from merge UPDATE SET clause (#94)
Identity columns must not appear in the SET list; filter by IsIdentity in addition to IsPrimary.
1 parent 2e85c0b commit 534c240

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/SqlBulkSyncFunction/Helpers/SqlStatementExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ THEN UPDATE
9595
),
9696
string.Join(
9797
",\r\n ",
98-
tableSchema.Columns.Where(column => !column.IsPrimary).Select(
98+
tableSchema.Columns.Where(column => !column.IsPrimary && !column.IsIdentity).Select(
9999
column => string.Concat(
100100
column.QuoteName,
101101
" = source.",

0 commit comments

Comments
 (0)