context.refresh_state.dict, query._only_load_props)
context.progress.pop(context.refresh_state)
- session._finalize_loaded(context.progress)
+ for state, dict_ in context.progress.items():
+ state.commit_all(dict_, session.identity_map)
+
for ii, (dict_, attrs) in context.partials.iteritems():
ii.commit(dict_, attrs)
if self.autoflush and not self._flushing:
self.flush()
- def _finalize_loaded(self, states):
- for state, dict_ in states.items():
- state.commit_all(dict_, self.identity_map)
-
def refresh(self, instance, attribute_names=None, lockmode=None):
"""Expire and refresh the attributes on the given instance.
assert serializer.loads(serializer.dumps(User.name, -1), None,
None) is User.name
+ @testing.requires.python26 # crashes in 2.5
def test_expression(self):
expr = \
select([users]).select_from(users.join(addresses)).limit(5)
eq_(re_expr.execute().fetchall(), [(7, u'jack'), (8, u'ed'),
(8, u'ed'), (8, u'ed'), (9, u'fred')])
+ @testing.requires.python26 # namedtuple workaround not serializable in 2.5
@testing.skip_if(lambda: util.pypy, "pickle sometimes has "
"problems here, sometimes not")
def test_query(self):
#eq_(q2.all(), [User(name='fred')])
#eq_(list(q2.values(User.id, User.name)), [(9, u'fred')])
+ @testing.requires.python26 # namedtuple workaround not serializable in 2.5
@testing.exclude('sqlite', '<=', (3, 5, 9),
'id comparison failing on the buildbot')
def test_aliases(self):