summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/sqlsoup.py
diff options
context:
space:
mode:
authorJonathan Ellis <jbellis@gmail.com>2008-10-28 20:25:25 +0000
committerJonathan Ellis <jbellis@gmail.com>2008-10-28 20:25:25 +0000
commit199257d7fbfb9bbd155c393f20652fe59aeffb48 (patch)
tree2ad9c12e505e2c78de910961bf3ef15b7ce37d20 /lib/sqlalchemy/ext/sqlsoup.py
parent0719e6f64823e288cc253e386ccf33857aac1250 (diff)
downloadsqlalchemy-199257d7fbfb9bbd155c393f20652fe59aeffb48.tar.gz
fix #821
Diffstat (limited to 'lib/sqlalchemy/ext/sqlsoup.py')
-rw-r--r--lib/sqlalchemy/ext/sqlsoup.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/ext/sqlsoup.py b/lib/sqlalchemy/ext/sqlsoup.py
index 31dbcb794..378174fb7 100644
--- a/lib/sqlalchemy/ext/sqlsoup.py
+++ b/lib/sqlalchemy/ext/sqlsoup.py
@@ -444,6 +444,9 @@ def _selectable_name(selectable):
def class_for_table(selectable, **mapper_kwargs):
selectable = expression._selectable(selectable)
mapname = 'Mapped' + _selectable_name(selectable)
+ if isinstance(mapname, unicode):
+ engine_encoding = selectable.metadata.bind.dialect.encoding
+ mapname = mapname.encode(engine_encoding)
if isinstance(selectable, Table):
klass = TableClassType(mapname, (object,), {})
else: