self.loaders_require_uniquing = False
self.params = params
- self.propagated_loader_options = {
+ self.propagated_loader_options = tuple(
# issue 7447.
# propagated loader options will be present on loaded InstanceState
# objects under state.load_options and are typically used by
cached_o
for cached_o in compile_state.select_statement._with_options
if cached_o.propagate_to_loaders and cached_o._is_compile_state
- } | {
+ ) + tuple(
# for user defined loader options that are not "compile state",
# those just need to be present as they are
uncached_o
for uncached_o in statement._with_options
if uncached_o.propagate_to_loaders
and not uncached_o._is_compile_state
- }
+ )
self.attributes = dict(compile_state.attributes)
if state.load_options or (loadopt and loadopt._extra_criteria):
effective_path = state.load_path[self.parent_property]
- opts = tuple(state.load_options)
+ opts = state.load_options
if loadopt and loadopt._extra_criteria:
use_get = False
for u in s1_users:
ustate = attributes.instance_state(u)
eq_(ustate.load_path.path, (umapper,))
- eq_(ustate.load_options, set())
+ eq_(ustate.load_options, ())
for u in s2_users:
sess.merge(u)
for u in s1_users:
ustate = attributes.instance_state(u)
eq_(ustate.load_path.path, (umapper,))
- eq_(ustate.load_options, set([opt2]))
+ eq_(ustate.load_options, (opt2,))
# test 2. present options are replaced by merge options
sess = fixture_session()
for u in s1_users:
ustate = attributes.instance_state(u)
eq_(ustate.load_path.path, (umapper,))
- eq_(ustate.load_options, set([opt1]))
+ eq_(ustate.load_options, (opt1,))
for u in s2_users:
sess.merge(u)
for u in s1_users:
ustate = attributes.instance_state(u)
eq_(ustate.load_path.path, (umapper,))
- eq_(ustate.load_options, set([opt2]))
+ eq_(ustate.load_options, (opt2,))
def test_resolve_conflicts_pending_doesnt_interfere_no_ident(self):
User, Address, Order = (