From a3af638e1a95d42075e25e87474663348dcf5c14 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 20 Apr 2015 17:38:03 -0400 Subject: - Fixed more regressions caused by NEVER_SET; comparisons to transient objects with attributes unset would leak NEVER_SET, and negated_contains_or_equals would do so for any transient object as the comparison used only the committed value. Repaired the NEVER_SET cases, fixes #3371, and also made negated_contains_or_equals() use state_attr_by_column() just like a non-negated comparison, fixes #3374 --- lib/sqlalchemy/orm/persistence.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/orm/persistence.py') diff --git a/lib/sqlalchemy/orm/persistence.py b/lib/sqlalchemy/orm/persistence.py index c2527ee3d..34c37dab6 100644 --- a/lib/sqlalchemy/orm/persistence.py +++ b/lib/sqlalchemy/orm/persistence.py @@ -531,7 +531,7 @@ def _collect_post_update_commands(base_mapper, uowtransaction, table, params[col._label] = \ mapper._get_state_attr_by_column( state, - state_dict, col) + state_dict, col, passive=attributes.PASSIVE_OFF) elif col in post_update_cols: prop = mapper._columntoproperty[col] -- cgit v1.2.1