]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Support extra / single inh criteria with ORM update/delete
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 30 Aug 2020 22:13:36 +0000 (18:13 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 30 Aug 2020 23:45:04 +0000 (19:45 -0400)
commit575b6dded9a25fca693f0aa7f6d7c6e735490460
tree4bc0c76ee49bdac200abe0ec73ade88564b727c0
parent406034d41a764f6fe24374d40c95e79d295f6e80
Support extra / single inh criteria with ORM update/delete

The ORM bulk update and delete operations, historically available via the
:meth:`_orm.Query.update` and :meth:`_orm.Query.delete` methods as well as
via the :class:`_dml.Update` and :class:`_dml.Delete` constructs for
:term:`2.0 style` execution, will now automatically accommodate for the
additional WHERE criteria needed for a single-table inheritance
discrminiator.   Joined-table inheritance is still not directly
supported. The new :func:`_orm.with_loader_criteria` construct is also
supported for all mappings with bulk update/delete.

Fixes: #5018
Fixes: #3903
Change-Id: Id90827cc7e2bc713d1255127f908c8e133de9295
doc/build/changelog/unreleased_14/5018.rst [new file with mode: 0644]
doc/build/orm/session_basics.rst
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/persistence.py
lib/sqlalchemy/orm/util.py
lib/sqlalchemy/sql/dml.py
test/orm/test_update_delete.py