Skip to content

Commit

Permalink
Merged r103336 from branch 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin committed Aug 28, 2009
1 parent a113b27 commit 8c1f9ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
1.3.11 (unreleased)
-------------------

- Don't create a new MetaData in LazyMapperCollection,
but use the one created in the wrapper.
In some cases, you could have some tables in the metadata created in the wrapper,
and some tables in the metadata created in the LazyMapperCollection,
which gave an error when trying to create relations.

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

Expand Down
4 changes: 2 additions & 2 deletions src/z3c/sqlalchemy/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import new
import threading

from sqlalchemy import Table, MetaData
from sqlalchemy import Table
from sqlalchemy.orm import mapper, relation, class_mapper
from sqlalchemy.ext.declarative import DeclarativeMeta

Expand Down Expand Up @@ -131,7 +131,7 @@ def __init__(self, wrapper):
self._wrapper = wrapper
self._engine = wrapper.engine
self._model = wrapper.model or {}
self._metadata = MetaData(self._engine)
self._metadata = wrapper.metadata
self._mapper_factory = MapperFactory(self._metadata)
self._dependent_tables = None
self._lock = threading.Lock()
Expand Down

0 comments on commit 8c1f9ae

Please sign in to comment.