Je me demande simplement si quelqu'un d'autre a rencontré ce problème. SubSonic génère un code SQL incorrect lors de l'utilisation de Group By ou Distinct with Paging. Est-ce une erreur connue?SubSonic génère un code SQL incorrect lors de l'utilisation de Group By ou Distinct with Paging
Notez que le groupe est dans le mauvais endroit lors de l'utilisation de la radiomessagerie.
SubSonic sortie SQL Sans Paging:
exec sp_executesql N'SELECT [dbo].[vwMapProject].[Id], [dbo].[vwMapProject].[Name]
FROM [dbo].[vwMapProject]
INNER JOIN [dbo].[Product_ProductComponent] ON [dbo].[vwMapProject].[ProductId] = [dbo].[Product_ProductComponent].[ProductId]
INNER JOIN [dbo].[ProductComponent] ON [dbo].[Product_ProductComponent].[ProductComponentId] = [dbo].[ProductComponent].[Id]
WHERE [dbo].[ProductComponent].[ExternalId] LIKE @ExternalId0
GROUP BY [dbo].[vwMapProject].[Id], [dbo].[vwMapProject].[Name]
',N'@ExternalId0 nvarchar(8)',@ExternalId0=N'GC767AV%'
SubSonic sortie SQL avec Paging:
exec sp_executesql N'
SELECT *
FROM (SELECT ROW_NUMBER() OVER (ORDER BY Id) AS Row,
[dbo].[vwMapProject].[Id], [dbo].[vwMapProject].[Name]
FROM [dbo].[vwMapProject]
INNER JOIN [dbo].[Product_ProductComponent] ON [dbo].[vwMapProject].[ProductId] = [dbo].[Product_ProductComponent].[ProductId]
INNER JOIN [dbo].[ProductComponent] ON [dbo].[Product_ProductComponent].[ProductComponentId] = [dbo].[ProductComponent].[Id]
GROUP BY [dbo].[vwMapProject].[Id], [dbo].[vwMapProject].[Name]
WHERE [dbo].[ProductComponent].[ExternalId] LIKE @ExternalId0
) AS PagedResults
WHERE Row >= 1 AND Row <= 20',N'@ExternalId0 nvarchar(8)',@ExternalId0=N'GC767AV%'
Selon son [blog] (http: // blog .wekeroad.com /) vous devriez signaler des problèmes à son [github repo] (http://github.com/subsonic/SubSonic-3.0/issues). – redsquare