]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Implement __delete__
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 1 Nov 2018 17:15:14 +0000 (13:15 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 2 Nov 2018 05:22:41 +0000 (01:22 -0400)
commit2e2af8d918a568ca3036f88e457caaf59f6af644
treee9f2c307a79fe1a0111f702e10166aa6ba5021f3
parent7d372da7385be6a9817a20b6b62f7c4237af7b26
Implement __delete__

A long-standing oversight in the ORM, the ``__delete__`` method for a many-
to-one relationship was non-functional, e.g. for an operation such as ``del
a.b``.  This is now implemented and is equivalent to setting the attribute
to ``None``.

Fixes: #4354
Change-Id: I60131a84c007b0bf6f20c5cc5f21a3b96e954046
doc/build/changelog/migration_13.rst
doc/build/changelog/unreleased_13/4354.rst [new file with mode: 0644]
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/dependency.py
lib/sqlalchemy/orm/unitofwork.py
test/orm/test_attributes.py
test/orm/test_unitofworkv2.py