summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-10-01 19:55:50 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-10-01 19:55:50 +0000
commit6d0cf81f7454bd4bcd66f5004c47b5f4bfaf6e25 (patch)
tree276062f360107fdc4a63f4fb24e907794882cc4d
parentfe3178e22457556fc98f577468f0bb24d28ce300 (diff)
downloadsqlalchemy-6d0cf81f7454bd4bcd66f5004c47b5f4bfaf6e25.tar.gz
- ident passed to id_chooser in shard.py always a list
-rw-r--r--CHANGES2
-rw-r--r--lib/sqlalchemy/orm/shard.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index d39c17e9a..b00571833 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 c38bcdd96..5036bc115 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: