Error in Linq Query EF 6 with 7.6.677.0 release

Error in Linq Query EF 6 with 7.6.677.0 release

Postby TopSviluppo » Mon 27 Jun 2016 14:51

We are developing an application using Entity Framework 6.1.3.
Today we upgraded DotConnect for PostgreSQL to 7.6.677.0 release and some linq queries that worked fine using 7.4.543.6 version now raise an exception '{"in CASE i tipi character varying e uuid non combaciano"}' (in italian).

An example is:
toReturn = (from row in dbContext.AnagAnagrafe
where row.IDAnagAnagrafe == IDAnagAnagrafe
select new DatiAnagrafe { contesto = row.Contesto, codiceAnagr = row.CodiceAnagr, ragioneSociale = row.RagioneSociale ?? String.Empty }).FirstOrDefault();
that prepares the SQL statement
SELECT
Extent1.CodiceAnagr,
Extent1.Contesto,
CASE WHEN Extent1.RagioneSociale IS NULL THEN CAST(:p__linq__1 AS uuid) ELSE Extent1.RagioneSociale END AS C1
FROM AnagAnagrafe AS Extent1
WHERE Extent1.IDAnagAnagrafe = (CAST(:p__linq__0 AS bigint))

The problem should be about
ragioneSociale = row.RagioneSociale ?? String.Empty
where 'String.Empty' is interpreted as a 'uuid'.
TopSviluppo
 
Posts: 7
Joined: Fri 19 Dec 2014 07:42

Re: Error in Linq Query EF 6 with 7.6.677.0 release

Postby Shalex » Fri 01 Jul 2016 15:33

Thank you for your report. We have reproduced the error. We will notify you when the issue is fixed.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44

Re: Error in Linq Query EF 6 with 7.6.677.0 release

Postby Shalex » Thu 07 Jul 2016 17:25

The bug with cast of parameters in the CASE expressions is fixed in the newest (7.6.687) build of dotConnect for PostgreSQL: http://forums.devart.com/viewtopic.php?f=3&t=33942.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44

Re: Error in Linq Query EF 6 with 7.6.677.0 release

Postby TopSviluppo » Tue 12 Jul 2016 12:41

Thank you for the fix, we got it and will try it as soon as possible
TopSviluppo
 
Posts: 7
Joined: Fri 19 Dec 2014 07:42


Return to dotConnect for PostgreSQL