Closed ijanusic88 closed 8 months ago
@ijanusic88 Sorry, I missed this post. Do you have a simple reproducible test case I can try this out to recreate the bug?
Closing until we have a more complete test case to verify the bug and identify the root cause. I will reopen when we get a test case.
We need to map a custom function to table-valued function. In the statement generated from EF, database schema is placed on the wrong place.
We are using Oracle.EntityFrameworkCore 6.21.61 Our configuration and mapping:
`public IQueryable GetName(int id)
=> FromExpression(() => GetName(id));
modelBuilder .HasDbFunction(typeof(MyDbContext).GetMethod(nameof(MyDbContext.GetName), new[] { typeof(int) })) .HasName("GetName") .HasSchema("MySchema");`
It produces following SQL statement: SELECT "g"."ID", "g"."FIRSTNAME", "g"."LASTNAME" FROM "MYSCHEMA".table("GETNAME"(99)) "g"
But it should be: SELECT "g"."ID", "g"."FIRSTNAME", "g"."LASTNAME" FROM table("MYSCHEMA"."GETNAME"(99)) "g"
Exception: "ORA-00903: Invalid Table Name"