summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_reflection.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-03-16 19:46:40 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-03-23 11:02:18 -0400
commit242867ec87c4d739011ee3cea9a53f33d9f05f2b (patch)
tree3e4aacfb77db1be73ee6492279bca54274b62473 /test/dialect/postgresql/test_reflection.py
parentda0c2def18ac21d191da122bd211ee0f48f646ae (diff)
downloadsqlalchemy-242867ec87c4d739011ee3cea9a53f33d9f05f2b.tar.gz
Adjust derivation rules for table vs. subquery against a join
Fixed bug where ORM queries using a correlated subquery in conjunction with :func:`_orm.column_property` would fail to correlate correctly to an enclosing subquery or to a CTE when :meth:`_sql.Select.correlate_except` were used in the property to control correlation, in cases where the subquery contained the same selectables as ones within the correlated subquery that were intended to not be correlated. This is achieved by adding a limiting factor to ClauseAdapter which is to explicitly pass the selectables we will be adapting "from", which is then used by AliasedClass to limit "from" to the mappers represented by the AliasedClass. This did cause one test where an alias for a contains_eager() was missing to suddenly fail, and the test was corrected, however there may be some very edge cases like that one where the tighter criteria causes an existing use case that's relying on the more liberal aliasing to require modifications. Fixes: #6060 Change-Id: I8342042641886e1a220beafeb94fe45ea7aadb33
Diffstat (limited to 'test/dialect/postgresql/test_reflection.py')
0 files changed, 0 insertions, 0 deletions