From 6d0cf81f7454bd4bcd66f5004c47b5f4bfaf6e25 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 1 Oct 2007 19:55:50 +0000 Subject: [PATCH] - ident passed to id_chooser in shard.py always a list --- CHANGES | 2 ++ lib/sqlalchemy/orm/shard.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d39c17e9a0..b00571833a 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,8 @@ CHANGES - fixed three- and multi-level select and deferred inheritance loading (i.e. abc inheritance with no select_table), [ticket:795] +- ident passed to id_chooser in shard.py always a list + 0.4.0beta6 ---------- diff --git a/lib/sqlalchemy/orm/shard.py b/lib/sqlalchemy/orm/shard.py index c38bcdd96c..5036bc1154 100644 --- a/lib/sqlalchemy/orm/shard.py +++ b/lib/sqlalchemy/orm/shard.py @@ -1,6 +1,6 @@ from sqlalchemy.orm.session import Session from sqlalchemy.orm.query import Query -from sqlalchemy import exceptions +from sqlalchemy import exceptions, util __all__ = ['ShardedSession', 'ShardedQuery'] @@ -100,6 +100,7 @@ class ShardedQuery(Query): if self._shard_id is not None: return super(ShardedQuery, self).get(ident) else: + ident = util.to_list(ident) for shard_id in self.id_chooser(self, ident): o = self.set_shard(shard_id).get(ident, **kwargs) if o is not None: -- 2.47.3