Lambda generate wrong query - EF Core

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
guiwaltricke
Posts: 4
Joined: Tue 16 Jun 2020 17:52

Lambda generate wrong query - EF Core

Post by guiwaltricke » Tue 16 Jun 2020 18:18

Hi, we are getting a error using "Devart.Data.PostgreSql.EFCore" and "Devart.Data.Oracle.EFCore"

we have a function that generate a lambda expression using commands, here a example of a lambda generated:

.Lambda #Lambda1<System.Func`2[Useall.Sign.Dominio.Documentos.Documento,System.Boolean]>(Useall.Sign.Dominio.Documentos.Documento $x)
{
$x.Id == 1 & $x.CodigoSistema == .Constant<System.Nullable`1[System.Int32]>(1)
}
Print: https://prnt.sc/t0xgyp

Devart generates this query:

SELECT COUNT(*)
FROM SIGN_DOC AS s
WHERE (s.IDUTILIZADOR = 0) AND ((s.IDDOC = 1) & ((s.IDSISTEMA = 1) AND s.IDSISTEMA IS NOT NULL))

and error appears: "operator does not exist: boolean & boolean"
Print: https://prnt.sc/t0xr7f

This error ocurrs in asp net core, we are using the same code in asp.net tradicional and works very good...

May you guys helpe us?

guiwaltricke
Posts: 4
Joined: Tue 16 Jun 2020 17:52

Re: Lambda generate wrong query - EF Core

Post by guiwaltricke » Fri 19 Jun 2020 12:30

Anyone? @Shalex

We really need this working...

Thanks

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Lambda generate wrong query - EF Core

Post by Shalex » Fri 19 Jun 2020 17:04

The bug with throwing "ORA-00907: missing right parenthesis" with Expression.Or, Expression.And in EF Core 3.1 is fixed in the newest v9.11.1034 build. Please upgrade to v9.11.1034.

If this doesn't help, send us a small test project with the corresponding DDL/DML script for reproducing the issue.

guiwaltricke
Posts: 4
Joined: Tue 16 Jun 2020 17:52

Re: Lambda generate wrong query - EF Core

Post by guiwaltricke » Fri 19 Jun 2020 17:50

Shalex wrote: Fri 19 Jun 2020 17:04 The bug with throwing "ORA-00907: missing right parenthesis" with Expression.Or, Expression.And in EF Core 3.1 is fixed in the newest v9.11.1034 build. Please upgrade to v9.11.1034.

If this doesn't help, send us a small test project with the corresponding DDL/DML script for reproducing the issue.
Hi @Shalex, the problem is not the "ORA-00907: missing right parenthesis"... the problem is the "&" in the query instead of "and'.

you send us a link for Oracle, but we are working here with Postgres.

Thanks

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Lambda generate wrong query - EF Core

Post by Shalex » Sat 20 Jun 2020 12:41

Sorry for the misleading message.

If the upgrade to dotConnect for PostgreSQL v7.17.1666 doesn't help, send us a small test project with the corresponding DDL/DML script for reproducing the issue.

guiwaltricke
Posts: 4
Joined: Tue 16 Jun 2020 17:52

Re: Lambda generate wrong query - EF Core

Post by guiwaltricke » Mon 22 Jun 2020 14:05

Shalex wrote: Sat 20 Jun 2020 12:41 Sorry for the misleading message.

If the upgrade to dotConnect for PostgreSQL v7.17.1666 doesn't help, send us a small test project with the corresponding DDL/DML script for reproducing the issue.
@Shalex, we send an email with a project to simulate, now we are waiting for you..

Thanks.

Post Reply