diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-05-29 19:54:51 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-05-29 19:54:51 -0400 |
| commit | 752f2e0fc8dec13e313a00f7c9720d24d21429ed (patch) | |
| tree | b8e8c5aa2ade21e1a80fa55f2d4a9f9756cf9088 /lib/sqlalchemy/orm/dependency.py | |
| parent | a04f0c1e3719d38e71509635cc1cba43a67ce090 (diff) | |
| download | sqlalchemy-752f2e0fc8dec13e313a00f7c9720d24d21429ed.tar.gz | |
- Adjustment to attribute mechanics concerning when a value is
implicitly initialized to None via first access; this action,
which has always resulted in a population of the attribute,
now emits an attribute event just like any other attribute set
operation and generates the same kind of history as one. Additionally,
many mapper internal operations will no longer implicitly generate
these "None" values when various never-set attributes are checked.
These are subtle behavioral fixes to attribute mechanics which provide
a better solution to the problem of :ticket:`3060`, which also
involves recognition of attributes explicitly set to ``None``
vs. attributes that were never set.
fixes #3061
Diffstat (limited to 'lib/sqlalchemy/orm/dependency.py')
| -rw-r--r-- | lib/sqlalchemy/orm/dependency.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/sqlalchemy/orm/dependency.py b/lib/sqlalchemy/orm/dependency.py index 0d5a4f909..68ae0a0e4 100644 --- a/lib/sqlalchemy/orm/dependency.py +++ b/lib/sqlalchemy/orm/dependency.py @@ -745,11 +745,6 @@ class ManyToOneDP(DependencyProcessor): for child in history.added: self._synchronize(state, child, None, False, uowcommit, "add") - elif history.unchanged == [None]: - # this is to appease the case where our row - # here is in fact going to be a so-called "row switch", - # where an INSERT becomes an UPDATE. See #3060. - self._synchronize(state, None, None, True, uowcommit) if self.post_update: self._post_update(state, uowcommit, history.sum()) |
