Skip to content

ExecuteUpdate generates invalid SQL for SQLite with TPT #31402

Open

Description

This manifests after unblocking ExecuteUpdate TPT support (as long as the updates touch only a single table in the hierarchy).

Example test is TPTInheritanceBulkUpdatesSqliteTest.Update_base_property_on_derived_type:

public virtual Task Update_base_property_on_derived_type(bool async)
    => AssertUpdate(
        async,
        ss => ss.Set<Kiwi>(),
        e => e,
        s => s.SetProperty(e => e.Name, "SomeOtherKiwi"),
        rowsAffectedCount: 1);

SQL:

UPDATE "Animals" AS "a"
SET "Name" = 'SomeOtherKiwi'
FROM "Birds" AS "b"
INNER JOIN "Kiwi" AS "k" ON "a"."Id" = "k"."Id"
WHERE "a"."Id" = "b"."Id"

Error: SQLite Error 1: 'no such column: a.Id'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions