-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Union of Anonymous Type having hardwired bool property throws exception #12623
Comments
@maumar to check if this is already fixed or something we need to fix. |
@maumar can you remind me if this is an issue that may need to be fixed in all providers or is it only in SQL CE? |
Also SQL Server it looks like |
@divega SqlServer and SqlCE. Sqlite is fine as is, but I'm not sure about postgres. |
Thanks for thinking about me :) If I understand this issue correctly, Npgsql/PostgreSQL should be fine because boolean literals are strongly-typed, recognized as such and don't need any casting. Running SELECT t.c, t."Nickname", t."SquadId", t."FullName", "g.Weapons"."Name", "g.Weapons"."OwnerFullName"
FROM "Weapons" AS "g.Weapons"
INNER JOIN (
SELECT FALSE AS c, g0."Nickname", g0."SquadId", g0."FullName"
FROM "Gears" AS g0
WHERE g0."Discriminator" IN ('Officer', 'Gear')
) AS t ON "g.Weapons"."OwnerFullName" = t."FullName"
ORDER BY t.c DESC NULLS LAST, t."Nickname" NULLS FIRST, t."SquadId" NULLS FIRST, t."FullName" NULLS FIRST And Let me know if you think I need to test or do anything else. |
Performing a Union of Anonymous Types,
having a hardwired bool property throws exception
[Workaround : making it an expression such as 1 == 1 or even calling an extension method that returns itself gets us around.]
Steps to reproduce
https://github.com/avinash-phaniraj-readify/EFCoreTestBed.git
Please checkout branch - UnionError
Further technical details
EF Core version: 2.1.1
Database Provider: EntityFrameworkCore.SqlServerCompact35 2.1.0.1
Operating system: Win 10
IDE: Visual Studio 2017 15.7.2
The text was updated successfully, but these errors were encountered: