summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-03-25 10:37:12 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-03-25 10:37:12 -0400
commit96dffd0ae9d19050f1d6000c35c4347bcb2dc6fe (patch)
tree053f3cca3633c450dd14b57bdf014a7824103909
parente3b09f65df5dd51f87515f115827dedba50e9dca (diff)
downloadsqlalchemy-96dffd0ae9d19050f1d6000c35c4347bcb2dc6fe.tar.gz
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
-rw-r--r--test/orm/test_eager_relations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/orm/test_eager_relations.py b/test/orm/test_eager_relations.py
index b42c70431..4cb6932cb 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)
)