]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
turn off deduping for col expressions
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 2 Sep 2021 18:11:38 +0000 (14:11 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 4 Sep 2021 14:50:16 +0000 (10:50 -0400)
commit95870c9569053e935ffe92e34af4aeb4bfd978a3
tree8e71bb961b90957fda63f6a0f77125643546c8c2
parentd640192877e4d1da75e8dea34d2374c404e80538
turn off deduping for col expressions

Fixed ORM issue where column expressions passed to ``query()`` or
ORM-enabled ``select()`` would be deduplicated on the identity of the
object, such as a phrase like ``select(A.id, null(), null())`` would
produce only one "NULL" expression, which previously was not the case in
1.3. However, the change also allows for ORM expressions to render as given
as well, such as ``select(A.data, A.data)`` will produce a result row with
two columns.

Fixes: #6979
Change-Id: I4dd59d4c7b1baa711b686379eb959f87c44841c4
doc/build/changelog/unreleased_14/6979.rst [new file with mode: 0644]
doc/build/orm/tutorial.rst
lib/sqlalchemy/orm/context.py
lib/sqlalchemy/orm/strategies.py
test/orm/test_query.py
test/profiles.txt