:tags: bug, orm
:tickets: 10279
- Adjusted the ORM's interpretation of UPDATE/DELETE targets to not interfere
- with the target table passed to the statement, such as for
- :class:`_orm.aliased` constructs. Cases like ORM session synchonize using
- "SELECT" statements such as with MySQL/ MariaDB will still have issues with
+ Adjusted the ORM's interpretation of the "target" entity used within
+ :class:`.Update` and :class:`.Delete` to not interfere with the target
+ "from" object passed to the statement, such as when passing an ORM-mapped
+ :class:`_orm.aliased` construct that should be maintained within a phrase
+ like "UPDATE FROM". Cases like ORM session synchonize using "SELECT"
+ statements such as with MySQL/ MariaDB will still have issues with
UPDATE/DELETE of this form so it's best to disable synchonize_session when
using DML statements of this type.
.. versionadded:: 2.0.21
-The previous section illustrated
-:func:`_orm.selectin_polymorphic` and :func:`_orm.selectinload` used as siblings
-within a call to :func:`_sql.select.options`. If the target entity is one that
-is already being loaded from a parent relationship, as in the example at
+The previous section illustrated :func:`_orm.selectin_polymorphic` and
+:func:`_orm.selectinload` used as sibling options, both used within a single
+call to :meth:`_sql.select.options`. If the target entity is one that is
+already being loaded from a parent relationship, as in the example at
:ref:`polymorphic_selectin_as_loader_option_target`, we can apply this
"sibling" pattern using the :meth:`_orm.Load.options` method that applies
sub-options to a parent, as illustrated at
-:ref:`orm_queryguide_relationship_sub_options`. Below we combine the two examples
-to load `Company.employees`, also loading the attributes for the `Manager` and
-`Engineer` classes, as well as eagerly loading the `Manager.paperwork`
-attribute::
+:ref:`orm_queryguide_relationship_sub_options`. Below we combine the two
+examples to load ``Company.employees``, also loading the attributes for the
+``Manager`` and ``Engineer`` classes, as well as eagerly loading the
+```Manager.paperwork``` attribute::
>>> from sqlalchemy.orm import selectinload
>>> stmt = select(Company).options(