diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-03 14:44:52 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-03 14:44:52 -0500 |
commit | 4e8f8d5499067a28f97fd911b6942a24384b67b1 (patch) | |
tree | 6012c6cab38474d45c21f5a65f7b1d08a35b085e | |
parent | f94122757407b386ad695ca2e339d5d3d234f53c (diff) | |
download | sqlalchemy-4e8f8d5499067a28f97fd911b6942a24384b67b1.tar.gz |
- fix oracle failures here due to mis-ordering
-rw-r--r-- | lib/sqlalchemy/orm/loading.py | 1 | ||||
-rw-r--r-- | test/orm/test_events.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/loading.py b/lib/sqlalchemy/orm/loading.py index af77fe3e0..b79ea429c 100644 --- a/lib/sqlalchemy/orm/loading.py +++ b/lib/sqlalchemy/orm/loading.py @@ -361,6 +361,7 @@ def instance_processor(mapper, context, path, adapter, ) instance = session_identity_map.get(identitykey) + if instance is not None: state = attributes.instance_state(instance) dict_ = attributes.instance_dict(instance) diff --git a/test/orm/test_events.py b/test/orm/test_events.py index e27294db4..edafc3a8b 100644 --- a/test/orm/test_events.py +++ b/test/orm/test_events.py @@ -156,7 +156,7 @@ class MapperEventsTest(_RemoveListeners, _fixtures.FixtureTest): s = Session() u2 = s.merge(User(name='u2')) s.commit() - s.query(User).first() + s.query(User).order_by(User.id).first() eq_(canary, ['load', 'load', 'load']) def test_inheritance(self): |