pool_args['use_threadlocal'] = self.pool_threadlocal()
pool = poolclass(creator, **pool_args)
else:
- if isinstance(pool, poollib.DBProxy):
+ if isinstance(pool, poollib._DBProxy):
pool = pool.get_pool(*cargs, **cparams)
else:
pool = pool
if populate_existing or context.session.is_expired(instance, unexpire=True):
if not context.identity_map.has_key(identitykey):
context.identity_map[identitykey] = instance
- if self.extension.populate_instance(self, context, row, instance, identitykey, True) is EXT_PASS:
- self.populate_instance(context, instance, row, identitykey, True)
+ if self.extension.populate_instance(self, context, row, instance, identitykey, True) is EXT_PASS:
+ self.populate_instance(context, instance, row, identitykey, True)
if self.extension.append_result(self, context, row, instance, identitykey, result, isnew) is EXT_PASS:
if result is not None:
result.append(instance)
return self.table.name + "." + self.name
else:
return self.name
- return self.name
else:
return self.name
self.assert_sql(db, lambda: ctx.current.flush(), [
(
"UPDATE mutabletest SET value=:value WHERE mutabletest.id = :mutabletest_id",
- {'mutabletest_id': 1, 'value': u'someothervalue'}
+ {'mutabletest_id': f1.id, 'value': u'someothervalue'}
),
])
f1.value = unicode('hi')
self.assert_sql(db, lambda: ctx.current.flush(), [
(
"UPDATE mutabletest SET data=:data, value=:value WHERE mutabletest.id = :mutabletest_id",
- {'mutabletest_id': 1, 'value': u'hi', 'data':f1.data}
+ {'mutabletest_id': f1.id, 'value': u'hi', 'data':f1.data}
),
])