]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Apply adaptation for most recent aliased=True first
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 31 May 2019 20:47:19 +0000 (16:47 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 31 May 2019 20:51:30 +0000 (16:51 -0400)
commitaba9781e10dbb00ee8c3e0a703b5c356e9674e0d
tree3e46a749f63dd91801aab2c936c7648ca9a257ca
parent63bc56ca629dc1b3232c9b17f30ab7af8bd3fb72
Apply adaptation for most recent aliased=True first

Fixed regression in :meth:`.Query.join` where the ``aliased=True`` flag
would not properly apply clause adaptation to filter criteria, if a
previous join were made to the same entity.  This is because the adapters
were placed in the wrong order.   The order has been reversed so that the
adapter for the most recent ``aliased=True`` call takes precedence as was
the case in 1.2 and earlier.  This broke the "elementtree" examples among
other things.

Fixes: #4704
Change-Id: I69f76c97b11157100854d552b5a0ce0103642ec4
(cherry picked from commit e6572789bb6fec5f1ac07653908c0f29d7904ece)
doc/build/changelog/unreleased_13/4704.rst [new file with mode: 0644]
lib/sqlalchemy/orm/query.py
test/orm/test_joins.py