Problem with CONTAINS on multiple queries

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
seb1487
Posts: 22
Joined: Fri 24 Jun 2016 10:27

Problem with CONTAINS on multiple queries

Post by seb1487 » Thu 06 Jul 2017 08:15

Hi,
dotConnect returns wrong elements when using CONTAINS multiple times - it returns always the same elements from the first usage. It seems that you are caching the values used the first time.

So if you execute the code

Code: Select all

var elements = dbContext.Class1.Where(o => selectedIds.Contains(o.Id)).ToList();
multiple times with different values in selectedIds, you will always get the elements from the first execution.

Democode can be downloaded here.

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Re: Problem with CONTAINS on multiple queries

Post by Shalex » Mon 10 Jul 2017 19:23

Thank you for your report. We will notify you when the issue is fixed.

Butzei
Posts: 12
Joined: Fri 26 May 2017 07:41

Re: Problem with CONTAINS on multiple queries

Post by Butzei » Wed 26 Jul 2017 13:48

Hi,
we have the same bug here. That was a hard time debuging :-).
Is there any update on this bug? We would need a fix in the next two weeks. Should we go for a workaround or wait for the update?

Thanks,
Butzei

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Re: Problem with CONTAINS on multiple queries

Post by Shalex » Thu 27 Jul 2017 07:26

The bug with using Contains() in multiple LINQ queries in EF Core is fixed. We will notify here when the new public build of dotConnect for Oracle is available for download (approximate timeframe is the end of the next week).

Butzei
Posts: 12
Joined: Fri 26 May 2017 07:41

Re: Problem with CONTAINS on multiple queries

Post by Butzei » Thu 27 Jul 2017 10:33

Thanks, sounds great!

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Re: Problem with CONTAINS on multiple queries

Post by Shalex » Fri 04 Aug 2017 17:06

The bug with using Contains() in multiple LINQ queries in EF Core is fixed: viewtopic.php?f=1&t=35777.

Post Reply