Page 1 of 1

Problem with CONTAINS on multiple queries

Posted: Thu 06 Jul 2017 08:15
by seb1487
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.

Re: Problem with CONTAINS on multiple queries

Posted: Mon 10 Jul 2017 19:23
by Shalex
Thank you for your report. We will notify you when the issue is fixed.

Re: Problem with CONTAINS on multiple queries

Posted: Wed 26 Jul 2017 13:48
by Butzei
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

Re: Problem with CONTAINS on multiple queries

Posted: Thu 27 Jul 2017 07:26
by Shalex
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).

Re: Problem with CONTAINS on multiple queries

Posted: Thu 27 Jul 2017 10:33
by Butzei
Thanks, sounds great!

Re: Problem with CONTAINS on multiple queries

Posted: Fri 04 Aug 2017 17:06
by Shalex
The bug with using Contains() in multiple LINQ queries in EF Core is fixed: viewtopic.php?f=1&t=35777.