You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT x."Id", x."Duration", x."SubjectId", x."Type",
(SELECT y."Created"
FROM "ModerationActions" AS y
WHERE (y."Type" = 0) AND (x."Id" = y."InfractionId")) AS "Created"
FROM "Infractions" AS x
... or equivalent. However, I'm getting...
SELECT x."Id", x."Duration", x."SubjectId", x."Type"
FROM "Infractions" AS x
SELECT y."Id", y."Created", y."CreatedById", y."InfractionId", y."Reason", y."Type"
FROM "ModerationActions" AS y
WHERE (y."Type" = 0) AND (@_outer_Id = y."InfractionId")
LIMIT 1
SELECT x."Id", x."Duration", x."SubjectId", x."Type", y."Id", y."Created", y."CreatedById", y."InfractionId", y."Reason", y."Type"FROM"Infractions"AS x
LEFT JOIN"ModerationActions"AS y
ON y."InfractionId"= x."Id"and y."Type"=0
Is this related to #11677 and #11186, or do I just not know what I'm doing? Is this just something that hasn't yet been implemented in Core?
The text was updated successfully, but these errors were encountered:
This is a duplicate of #11186 - when projecting Created property by itself (without the Infraction entity) we correctly produce a subquery in this case. However presence of the entity blocks the translation.
Ok where is this issue tracked currently.
I keep seing "closed" and linked to a duplicate and then ending up on the same issues.
The fact is queries in EF Core are producing duplicate unnecessary queries when trying to fetch related data.
doing joins and left joins with defaultifempty into a group so you end up with 5000 lines of code only to realize it throws other errors out.
When is one going to be able to select (m from x where m=blabla select new { m.y, m.relatedRecords.Select(cr=>cr.SomeData).FirstOrDefault()).Skip(10).Take(10)
in a single query.
It's like I went back to the stoneage since switching to EF Core. Ridiculous.
Using Microsoft.EntityFrameworkCore (2.1.0) with Npgsql.EntityFrameworkCore.PostgreSQL (2.1.0)
For EF query...
...I would expect this to generate...
... or equivalent. However, I'm getting...
...Similarly, I would expect...
...to translate to something like...
Is this related to #11677 and #11186, or do I just not know what I'm doing? Is this just something that hasn't yet been implemented in Core?
The text was updated successfully, but these errors were encountered: