Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/EFCore.PG/Query/Internal/NpgsqlQuerySqlGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ protected override Expression VisitUpdate(UpdateExpression updateExpression)
var table = selectExpression.Tables[i];
var joinExpression = table as JoinExpressionBase;

if (ReferenceEquals(updateExpression.Table, joinExpression?.Table ?? table))
if (updateExpression.Table.Alias == (joinExpression?.Table.Alias ?? table.Alias))
{
LiftPredicate(table);
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,17 @@ DELETE FROM "Owner" AS o
""");
}

// TODO: #3253
public override async Task Replace_ColumnExpression_in_column_setter(bool async)
{
var exception = await Assert.ThrowsAsync<PostgresException>(() => base.Replace_ColumnExpression_in_column_setter(async));
await base.Replace_ColumnExpression_in_column_setter(async);

Assert.Equal("42712", exception.SqlState);
AssertSql(
"""
UPDATE "OwnedCollection" AS o0
SET "Value" = 'SomeValue'
FROM "Owner" AS o
WHERE o."Id" = o0."OwnerId"
""");
}

public override async Task Delete_aggregate_root_when_table_sharing_with_non_owned_throws(bool async)
Expand Down