Skip to content

Commit 09c73d3

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 110c859 commit 09c73d3

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Core/Resolvers/DWSqlQueryBuilder.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,8 @@ public string Build(SqlUpsertQueryStructure structure)
442442
string pkPredicates = JoinPredicateStrings(Build(structure.Predicates));
443443

444444
// Predicates by virtue of PK + database policy for the update operation.
445-
// The database policy must be applied to the UPDATE statement's WHERE clause so that
446-
// an upsert which resolves to an update only affects rows the caller is authorized to modify.
447-
// Omitting it would (a) apply the update to every row in the table since only the SET clause
448-
// would remain, and (b) bypass any row-level update policy. See MsSqlQueryBuilder for parity.
445+
// PK predicates ensure the UPDATE targets only the requested row(s); the database policy predicate
446+
// further restricts updates to rows the caller is authorized to modify. See MsSqlQueryBuilder for parity.
449447
string updatePredicates = JoinPredicateStrings(pkPredicates, structure.GetDbPolicyForOperation(EntityActionOperation.Update));
450448

451449
string updateOperations = Build(structure.UpdateOperations, ", ");

0 commit comments

Comments
 (0)