summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2022-12-08 00:25:34 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2022-12-08 00:25:34 +0000
commitcaccf151f2e1b357fa2a5d37135580ce9931eec2 (patch)
treecb2f1bbe0cc4b49d0a99f3d3a48285a5ff4d4066 /doc
parent3d8d366e1b5e2f0caa728a741dad5e467b67c7ac (diff)
parent66c6b8558a6b64820b790199816acc66deffdacc (diff)
downloadsqlalchemy-caccf151f2e1b357fa2a5d37135580ce9931eec2.tar.gz
Merge "disable polymorphic adaption in most cases" into main
Diffstat (limited to 'doc')
-rw-r--r--doc/build/changelog/unreleased_20/8168.rst27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/build/changelog/unreleased_20/8168.rst b/doc/build/changelog/unreleased_20/8168.rst
new file mode 100644
index 000000000..4e15683b3
--- /dev/null
+++ b/doc/build/changelog/unreleased_20/8168.rst
@@ -0,0 +1,27 @@
+.. change::
+ :tags: bug, orm
+ :tickets: 8168
+
+ Improved a fix first made in version 1.4 for :ticket:`8456` which scaled
+ back the usage of internal "polymorphic adapters", that are used to render
+ ORM queries when the :paramref:`_orm.Mapper.with_polymorphic` parameter is
+ used. These adapters, which are very complex and error prone, are now used
+ only in those cases where an explicit user-supplied subquery is used for
+ :paramref:`_orm.Mapper.with_polymorphic`, which includes only the use case
+ of concrete inheritance mappings that use the
+ :func:`_orm.polymorphic_union` helper, as well as the legacy use case of
+ using an aliased subquery for joined inheritance mappings, which is not
+ needed in modern use.
+
+ For the most common case of joined inheritance mappings that use the
+ built-in polymorphic loading scheme, which includes those which make use of
+ the :paramref:`_orm.Mapper.polymorphic_load` parameter set to ``inline``,
+ polymorphic adapters are now no longer used. This has both a positive
+ performance impact on the construction of queries as well as a
+ substantial simplification of the internal query rendering process.
+
+ The specific issue targeted was to allow a :func:`_orm.column_property`
+ to refer to joined-inheritance classes within a scalar subquery, which now
+ works as intuitively as is feasible.
+
+