summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2017-06-06 18:53:03 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2017-06-06 18:53:03 -0400
commitacf64c4178169b765f3f7ae492b1774955cf541f (patch)
treec68f881515358716f2f32d1c1fad81f47bd2291b /lib/sqlalchemy
parentf1faec8829fc0d1c353aea9bb5272c4b5726d999 (diff)
downloadsqlalchemy-acf64c4178169b765f3f7ae492b1774955cf541f.tar.gz
- assert passive_deletes='all' does not affect collection/scalar
membership removal in issue #3844 we hypotheized that passive_deletes='all' was broken because it sets to NULL a foreign key attribute when the child object is removed or replaced. However, not doing the NULL set means that nothing happens at all and the operation silently fails. Change-Id: I11834e7e324349e172dc797bac62731008b6b95a
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/relationships.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py
index 97adf4d8b..94c0d6694 100644
--- a/lib/sqlalchemy/orm/relationships.py
+++ b/lib/sqlalchemy/orm/relationships.py
@@ -626,13 +626,14 @@ class RelationshipProperty(StrategizedProperty):
database side.
Additionally, setting the flag to the string value 'all' will
- disable the "nulling out" of the child foreign keys, when there
- is no delete or delete-orphan cascade enabled. This is
- typically used when a triggering or error raise scenario is in
- place on the database side. Note that the foreign key
- attributes on in-session child objects will not be changed
- after a flush occurs so this is a very special use-case
- setting.
+ disable the "nulling out" of the child foreign keys, when the parent
+ object is deleted and there is no delete or delete-orphan cascade
+ enabled. This is typically used when a triggering or error raise
+ scenario is in place on the database side. Note that the foreign
+ key attributes on in-session child objects will not be changed after
+ a flush occurs so this is a very special use-case setting.
+ Additionally, the "nulling out" will still occur if the child
+ object is de-associated with the parent.
.. seealso::