GroupBy doesn't work
Posted: Thu 21 May 2009 01:48
Hi,
GroupBy completley doesn't work with the PostgreSql adapter. For example
Generates the following SQL, which is clearly incorrect, it's missing the GROUP BY Statement:
Any ideas on when this will be fixed?
Thanks,
Roy
GroupBy completley doesn't work with the PostgreSql adapter. For example
Code: Select all
from stats in dataContext.Stats
where stats.Metric.MetricName == "Foo"
&& stats.IsValid == "Y"
group stats by stats.Value into Values
select new { ValueName = Values.Key.ValueName, Count = Values.Count()};
Code: Select all
SELECT t4.value_name AS "ValueName", COUNT(*) AS "C1"
FROM (
SELECT t2.id_value
FROM public.stats t2
INNER JOIN public.metric t3 ON t2.id_metric = t3.id_metric
WHERE (t3.metric_name = :p0) AND (t2.is_valid = :p1)
) t1
INNER JOIN public.values t4 ON t1.id_value = t4.id_value
Any ideas on when this will be fixed?
Thanks,
Roy