npgsql / efcore.pg

Entity Framework Core provider for PostgreSQL
PostgreSQL License
1.49k stars 215 forks source link

Bug. Ef Core cannot translate postgresql Array functions when used optimized EF Core Model #3168

Open megafetis opened 1 month ago

megafetis commented 1 month ago

Whe i use Optimized DbContext: dotnet ef dbcontext optimize --context MainDbContext Postgresql array functions cannot translate to sql:

image

I tried to use many funtions from documentation https://www.npgsql.org/efcore/mapping/array.html. Works only this: String.Join(separator, array) I use NET 8

roji commented 1 month ago

@megafetis please post a minimal, runnable console program that shows the problem. Screenshots of partial code snippets aren't helpful.

megafetis commented 1 month ago

@megafetis please post a minimal, runnable console program that shows the problem. Screenshots of partial code snippets aren't helpful.

@roji Hello, take a link to test app: https://github.com/megafetis/NpgsqlEfCoreBugConsoleApp1