]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
ensure relationship.order_by stored as a tuple; check in dynamic also
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 May 2021 01:15:01 +0000 (21:15 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 May 2021 01:31:18 +0000 (21:31 -0400)
commitaaba0650d7410f579b2c14f8f1b0680a1d1852c4
tree22909a68b1802aa5fefa12a276040414e6aa8ec2
parent4c6f10d7a3665e895b095db2f29ad04a9ac71ded
ensure relationship.order_by stored as a tuple; check in dynamic also

Fixed regression in dynamic loader strategy and :func:`_orm.relationship`
overall where the :paramref:`_orm.relationship.order_by` parameter were
stored as a mutable list, which could then be mutated when combined with
additional "order_by" methods used against the dynamic query object,
causing the ORDER BY criteria to continue to grow repetitively.

Fixes: #6549
Change-Id: I9f4c9a723aa0923f115cbe39bfaaa9cac62153b1
doc/build/changelog/unreleased_14/6549.rst [new file with mode: 0644]
lib/sqlalchemy/orm/dynamic.py
lib/sqlalchemy/orm/relationships.py
test/orm/test_dynamic.py