summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-05-13 14:56:12 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-05-13 22:06:59 -0400
commitb6619f267ba6a327d6bff1aa650dd3ab9b718b29 (patch)
tree8f4a964a35615f66fb5b8c03648a24c2cdb79eea /lib/sqlalchemy
parentb26642e2364836fe9a8ee25c1cf4551901ce0c37 (diff)
downloadsqlalchemy-b6619f267ba6a327d6bff1aa650dd3ab9b718b29.tar.gz
Continue to assume None for un-accessed attribute on persistent
object during m2o fetch Fixed regression in new relationship m2o comparison logic first introduced at :ref:`change_4359` when comparing to an attribute that is persisted as NULL and is in an un-fetched state in the mapped instance. Since the attribute has no explicit default, it needs to default to NULL when accessed in a persistent setting. Fixes: #4676 Change-Id: I17160c30131187c735f025a785ff0276a246f6bb
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/relationships.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py
index 008cfcd2a..b40fad332 100644
--- a/lib/sqlalchemy/orm/relationships.py
+++ b/lib/sqlalchemy/orm/relationships.py
@@ -1574,7 +1574,7 @@ class RelationshipProperty(StrategizedProperty):
state,
dict_,
column,
- passive=attributes.PASSIVE_RETURN_NEVER_SET
+ passive=attributes.PASSIVE_OFF
if state.persistent
else attributes.PASSIVE_NO_FETCH ^ attributes.INIT_OK,
)