google-code-export / dataobjectsdotnet

Automatically exported from code.google.com/p/dataobjectsdotnet
0 stars 0 forks source link

GroupBy on constant error #844

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
.GroupBy(x => 0) generates incorrect SQL query:

SELECT TOP 2 [a].[column1] FROM (SELECT 0 AS [column], MAX([b].[Name]) AS 
[column1] FROM (SELECT [c].[ID], 101 AS [TypeId], [c].[Enterprise.ID], 
[c].[Site.ID], [c].[Name] FROM [dbo].[Area] [c]) [b] GROUP BY 0) [a];

it must generate "GROUP BY column1"

Original issue reported on code.google.com by alexey.g...@gtempaccount.com on 25 Oct 2010 at 2:21

GoogleCodeExporter commented 9 years ago

Original comment by alexey.g...@gtempaccount.com on 27 Oct 2010 at 9:37