diff options
author | Diana Clarke <diana.joan.clarke@gmail.com> | 2016-04-05 18:58:21 -0400 |
---|---|---|
committer | Diana Clarke <diana.joan.clarke@gmail.com> | 2016-04-05 18:58:21 -0400 |
commit | 0f502fa418e32177ae139afb7a816ff849baeef5 (patch) | |
tree | 86b8976d11669f94828631a67d5f565cac765a8f /lib/sqlalchemy/orm/session.py | |
parent | fdb6ab6a1d5d55d900c388e039835c6433032977 (diff) | |
download | sqlalchemy-pr/256.tar.gz |
- don't load deferred columns on unexpire for merge with load=False,pr/256
fixes #3488
Co-Authored-By: Mike Bayer <mike_mp@zzzcomputing.com>
Diffstat (limited to 'lib/sqlalchemy/orm/session.py')
-rw-r--r-- | lib/sqlalchemy/orm/session.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index dc5de7ac6..1cf1bdb24 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -1842,6 +1842,13 @@ class Session(_SessionClassMethods): merged_state.load_path = state.load_path merged_state.load_options = state.load_options + # since we are copying load_options, we need to copy + # the callables_ that would have been generated by those + # load_options. + # assumes that the callables we put in state.callables_ + # are not instance-specific (which they should not be) + merged_state._copy_callables(state) + for prop in mapper.iterate_properties: prop.merge(self, state, state_dict, merged_state, merged_dict, |