efcore.pg icon indicating copy to clipboard operation
efcore.pg copied to clipboard

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

Open megafetis opened this issue 1 year ago • 2 comments

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

megafetis avatar May 14 '24 12:05 megafetis

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

roji avatar May 14 '24 21:05 roji

@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

megafetis avatar May 15 '24 11:05 megafetis

Thanks for providing the repro, and sorry it took so long to get around to investigating this. This indeed turned out to be a real bug on the EF side - I've opened https://github.com/dotnet/efcore/issues/35047 to track addressing it there.

roji avatar Nov 05 '24 16:11 roji