Page 1 of 1

Bugs in Count....

Posted: Fri 22 May 2009 00:40
by LPCRoy
Hi,
I've noticed that if I use a where statement before a Count statement in a select after a group by, the where statement is completely ignored.

For example

from x in dataContext.Table
where x.Parameter == value
group x by x.Value into y
select new {y.Key, FilteredCount = y.Where(z => z.SomeValue == true).Count()}


The filter "z => z.SomeValue == true" never gets evaluated and the count includes all items, not just ones that pass the filter.

Posted: Fri 22 May 2009 07:54
by AndreyR
Thank you for the report, we have reproduced the problem.
I will let you know about the results of our investigation.

Posted: Tue 16 Jun 2009 14:21
by AndreyR
This problem is fixed, look forward to the upcoming build of dotConnect for PostgreSQL.