dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.41k stars 3.11k forks source link

Use Microsoft.EntityFrameworkCore & Oracle.EntityFrameworkCore get a ORA-00904: "FALSE": invalid identifier #33712

Closed denisding closed 2 weeks ago

denisding commented 2 weeks ago

Ask a question

Where I use _entityRepository.Entities.AnyAsync(whereExpression);

I get a sql like this:

SELECT CASE
          WHEN EXISTS (
              SELECT 1
              FROM "SYS_MENUS" "s"
              WHERE (((((("s"."PCODE" = :menu_PCode_0) AND ("s"."PID" = :menu_PId_1))) AND ("s"."NAME" = :menu_Name_2))) AND ("s"."ID" <> :menu_Id_3))) THEN True
          ELSE False
      END FROM DUAL

But Oracle do not support 'True' and 'False',What should I do?

ajcvickers commented 2 weeks ago

@denisding You'll need to report this to Oracle who maintain the Oracle provider for EF Core.

denisding commented 2 weeks ago

Think you, I have already solved it. Reference: https://forums.oracle.com/ords/apexds/post/oracle-entityframeworkcore-8-23-40-any-returns-ora-00904-fa-4392 https://github.com/oracle/dotnet-db-samples/issues/377

denisding commented 2 weeks ago

Reference 2: https://github.com/oracle/dotnet-db-samples/issues/377