Skip to content

Commit

Permalink
When generating the mapper class, make sure table.name is a string.
Browse files Browse the repository at this point in the history
It can be unicode when use_unicode=1 with MySQL engine.
  • Loading branch information
vincentfretin committed Aug 28, 2009
1 parent 8294727 commit faf92f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions CHANGES.txt
@@ -1,5 +1,11 @@
1.3.10 (04.082009)
------------------
1.3.11 (unreleased)
-------------------

- When generating the mapper class, make sure table.name is a string.
It can be unicode when use_unicode=1 with MySQL engine.

1.3.10 (04.08.2009)
-------------------

- removed SA deprecation warning

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -21,7 +21,7 @@
'Topic :: Software Development :: Libraries :: Python Modules',
]

version = '1.3.10.1'
version = '1.3.11'

desc = open('README.txt').read().strip()
changes = open('CHANGES.txt').read().strip()
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/sqlalchemy/mapper.py
Expand Up @@ -112,7 +112,7 @@ class (will be autogenerated if not available).
"""

if cls is None:
newCls = new.classobj('_mapped_%s' % table.name, (MappedClassBase,), {})
newCls = new.classobj('_mapped_%s' % str(table.name), (MappedClassBase,), {})
else:
newCls = cls

Expand Down

0 comments on commit faf92f7

Please sign in to comment.