diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-04-20 17:38:03 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-04-20 17:38:03 -0400 |
| commit | a3af638e1a95d42075e25e87474663348dcf5c14 (patch) | |
| tree | 4549f2261067856a251367d49e97e40d0bb84b2c /lib/sqlalchemy/orm/sync.py | |
| parent | bd61e7a3287079cf742f4df698bfe3628c090522 (diff) | |
| download | sqlalchemy-a3af638e1a95d42075e25e87474663348dcf5c14.tar.gz | |
- 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
Diffstat (limited to 'lib/sqlalchemy/orm/sync.py')
| -rw-r--r-- | lib/sqlalchemy/orm/sync.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/sync.py b/lib/sqlalchemy/orm/sync.py index e9a745cc0..e8e273a86 100644 --- a/lib/sqlalchemy/orm/sync.py +++ b/lib/sqlalchemy/orm/sync.py @@ -85,7 +85,7 @@ def update(source, source_mapper, dest, old_prefix, synchronize_pairs): oldvalue = source_mapper._get_committed_attr_by_column( source.obj(), l) value = source_mapper._get_state_attr_by_column( - source, source.dict, l) + source, source.dict, l, passive=attributes.PASSIVE_OFF) except exc.UnmappedColumnError: _raise_col_to_prop(False, source_mapper, l, None, r) dest[r.key] = value @@ -96,7 +96,7 @@ def populate_dict(source, source_mapper, dict_, synchronize_pairs): for l, r in synchronize_pairs: try: value = source_mapper._get_state_attr_by_column( - source, source.dict, l) + source, source.dict, l, passive=attributes.PASSIVE_OFF) except exc.UnmappedColumnError: _raise_col_to_prop(False, source_mapper, l, None, r) |
