summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/array.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-01-16 10:21:45 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2022-01-18 16:07:41 -0500
commitbb11d5b7c2256861fdfe64f5cded94ce15266132 (patch)
treee623a880409a28adef0211906df81fd2363d34e3 /lib/sqlalchemy/dialects/postgresql/array.py
parenteb716884a4abcabae84a6aaba105568e925b7d27 (diff)
downloadsqlalchemy-bb11d5b7c2256861fdfe64f5cded94ce15266132.tar.gz
enhance double-aliased table logic to handle more cases
Fixed ORM regression where calling the :func:`_orm.aliased` function against an existing :func:`_orm.aliased` construct would fail to produce correct SQL if the existing construct were against a fixed table. The fix allows that the original :func:`_orm.aliased` construct is disregarded if it were only against a table that's now being replaced. It also allows for correct behavior when constructing a :func:`_orm.aliased` without a selectable argument against a :func:`_orm.aliased` that's against a subuquery, to create an alias of that subquery (i.e. to change its name). The nesting behavior of :func:`_orm.aliased` remains in place for the case where the outer :func:`_orm.aliased` object is against a subquery which in turn refers to the inner :func:`_orm.aliased` object. This is a relatively new 1.4 feature that helps to suit use cases that were previously served by the deprecated ``Query.from_self()`` method. Fixes: #7576 Change-Id: Ia9ca606f6300e38b6040eb6fc7facfe97c8cf057
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/array.py')
0 files changed, 0 insertions, 0 deletions