-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bulk Update and Bulk Delete Incorrectly assign aliases for SQL query parts when join of Update/Delete operation and base SqlSelect query is performed using IN. For instance, PostgreSQL provider uses such join.
Test query
var query = session.Query.All<DowntimeReason>()
.Where(r => r.DowntimeInfo.Record.Equipment.Id == 333);
is translated to :
DELETE FROM "public"."DowntimeReason" WHERE ("DowntimeReason"."Id" IN (SELECT "a"."Id" FROM "public"."DowntimeReason" "b" LEFT OUTER JOIN "public"."DowntimeInfo" "c" ON ("b"."DowntimeInfo.Id" = "c"."Id") LEFT OUTER JOIN "public"."Record" "d" ON ("c"."Record.Id" = "d"."Id") WHERE ("d"."Equipment.Id" = @p0_0)))
which leads to exception, because of absence of table with "a" alias
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working