A collection of enum array values get translated as (NULL, NULL ...)
Hello,
I have found another regression since .NET 9. I am unsure which version specifically caused it because I can't test due to the other problems I have logged in the past.
In any case, this worked in .NET 8.
We store our enums as a string in the database with Property.HasConversion<string>()
The following LINQ statement:
- var result = await ctx.Vehicles
- .Where(_ => statuses.Contains(_.Status))
- .ToListAsync();
Would translate in .NET 8 into
- SELECT "v"."Id", "v"."Status", "v"."Type"
- FROM "Vehicles" "v"
- WHERE "v"."Status" IN (TO_NCLOB('New'), TO_NCLOB('Crashed'))
But in the latest release with .NET 9 this no longer happens:
- SELECT "v"."Id", "v"."Status", "v"."Type"
- FROM "Vehicles" "v"
- WHERE "v"."Status" IN (NULL, NULL)
From my testing, this has nothing to do with the NCLOB because the same issue arises with
- OracleEntityProviderConfig.Instance.CodeFirstOptions.UseNonUnicodeStrings = true;
- OracleEntityProviderConfig.Instance.CodeFirstOptions.UseNonLobStrings = true;
Possibly it has to do with the inheritance (vehicle --> car in example).
Thanks for checking,