]> 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:48:01 +0000 (16:48 -0400)
commite6572789bb6fec5f1ac07653908c0f29d7904ece
treeacf2955db1a6698f24b82c6c6c2ab1ba2848029d
parent90ed3cd99fe007626b2b830a93c8c1e14e15536a
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
doc/build/changelog/unreleased_13/4704.rst [new file with mode: 0644]
lib/sqlalchemy/orm/query.py
test/orm/test_joins.py