summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-03-23 17:25:57 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-03-23 17:25:57 -0400
commit93da3087f1a068018a3c5a67f61dbbfa5178bdf0 (patch)
treec4a9b03d0cc85156d1554f7c0f62fba137a2520d /lib/sqlalchemy
parenta294df9748f1314a2db7de5bc39d091854d0fec3 (diff)
downloadsqlalchemy-93da3087f1a068018a3c5a67f61dbbfa5178bdf0.tar.gz
- Fixed regression whereby MetaData() coming
back from unpickling did not keep track of new things it keeps track of now, i.e. collection of Sequence objects, list of schema names. [ticket:2104]
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/schema.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py
index bc3eac213..c8d00f407 100644
--- a/lib/sqlalchemy/schema.py
+++ b/lib/sqlalchemy/schema.py
@@ -2101,7 +2101,6 @@ class MetaData(SchemaItem):
self._schemas = set()
self._sequences = set()
self.bind = bind
- self.metadata = self
if reflect:
if not bind:
raise exc.ArgumentError(
@@ -2132,11 +2131,13 @@ class MetaData(SchemaItem):
if t.schema is not None])
def __getstate__(self):
- return {'tables': self.tables}
+ return {'tables': self.tables, 'schemas':self._schemas}
def __setstate__(self, state):
self.tables = state['tables']
self._bind = None
+ self._sequences = set()
+ self._schemas = state['schemas']
def is_bound(self):
"""True if this MetaData is bound to an Engine or Connection."""