Jira issue originally created by user spencerweiss:
Running the query taken from this page: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html
$query = $em->createQuery('SELECT u, count(g.id) FROM FundAsset u JOIN u.locations g GROUP BY u.id');
I receive the following error from MS SQL Server:
SQLSTATE: [Microsoft][SQL Server Native Client 11.0][SQL Server]Column 'fund_assets.active' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
It appears that Doctrine's GROUP BY clause does not work correctly in Microsoft SQL Server.
Comment created by @ocramius:
Needs a failing test case.