From: Mike Bayer Date: Thu, 25 Mar 2021 14:37:12 +0000 (-0400) Subject: don't rely on pk-only group_by X-Git-Tag: rel_1_4_3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96dffd0ae9d19050f1d6000c35c4347bcb2dc6fe;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git don't rely on pk-only group_by Fixed the test test_aliased_stmt_includes_unnamed_fn recently added in c1c999c01d to include the additional column in the GROUP BY statement, allowing this statement to succeed on SQL Server which seems to not support "group by pk only" syntax. Change-Id: I42184d77c9017ebdb76ac5a9ae1f8128561243ec --- diff --git a/test/orm/test_eager_relations.py b/test/orm/test_eager_relations.py index b42c704310..4cb6932cbc 100644 --- a/test/orm/test_eager_relations.py +++ b/test/orm/test_eager_relations.py @@ -513,7 +513,7 @@ class EagerTest(_fixtures.FixtureTest, testing.AssertsCompiledSQL): q = ( s.query(User, func.count(User.id)) .order_by(User.id) - .group_by(User.id) + .group_by(User.id, User.name) .limit(1) )