summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/build/changelog/migration_13.rst18
-rw-r--r--doc/build/changelog/unreleased_13/4354.rst12
2 files changed, 30 insertions, 0 deletions
diff --git a/doc/build/changelog/migration_13.rst b/doc/build/changelog/migration_13.rst
index 585a9c3a5..fee5ad5e9 100644
--- a/doc/build/changelog/migration_13.rst
+++ b/doc/build/changelog/migration_13.rst
@@ -84,6 +84,24 @@ users should report a bug, however the change also incldues a flag
:ticket:`4340`
+.. _change_4354:
+
+"del" implemented for ORM attributes
+------------------------------------
+
+The Python ``del`` operation was not really usable for mapped attributes, either
+scalar columns or object references. Support has been added for this to work correctly,
+where the ``del`` operation is roughly equivalent to setting the attribute to the
+``None`` value::
+
+
+ some_object = session.query(SomeObject).get(5)
+
+ del some_object.some_attribute # from a SQL perspective, works like "= None"
+
+:ticket:`4354`
+
+
.. _change_4257:
info dictionary added to InstanceState
diff --git a/doc/build/changelog/unreleased_13/4354.rst b/doc/build/changelog/unreleased_13/4354.rst
new file mode 100644
index 000000000..ba25a2231
--- /dev/null
+++ b/doc/build/changelog/unreleased_13/4354.rst
@@ -0,0 +1,12 @@
+.. change::
+ :tags: bug, orm
+ :tickets: 4354
+
+ 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``.
+
+ .. seealso::
+
+ :ref:`change_4354` \ No newline at end of file