summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-07-24 17:37:25 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2016-07-24 23:17:11 -0400
commit2c8643b0e98070bbf51bc38d32258526634ee67d (patch)
treeb7aee41d45e0f6964060abd2a219d9165743555f /lib
parent96c4208bf83607120d2f716070ed22ee10312dd0 (diff)
downloadsqlalchemy-2c8643b0e98070bbf51bc38d32258526634ee67d.tar.gz
Allow Table._reset_exported to silently pass
Fixed bug in :class:`.Table` where the internal method ``_reset_exported()`` would corrupt the state of the object. This method is intended for selectable objects and is called by the ORM in some cases; an erroneous mapper configuration would could lead the ORM to call this on on a :class:`.Table` object. Change-Id: I63fa34ee0cdf16358bb125c556390df79758bcbc Fixes: #3755
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/orm/mapper.py2
-rw-r--r--lib/sqlalchemy/sql/schema.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py
index 858c35344..b76a6f727 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -1230,7 +1230,6 @@ class Mapper(InspectionAttr):
instrumentation.unregister_class(self.class_)
def _configure_pks(self):
-
self.tables = sql_util.find_tables(self.mapped_table)
self._pks_by_table = {}
@@ -1316,7 +1315,6 @@ class Mapper(InspectionAttr):
col.table not in self._cols_by_table))
def _configure_properties(self):
-
# Column and other ClauseElement objects which are mapped
self.columns = self.c = util.OrderedProperties()
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py
index ee139827a..55d0b74e6 100644
--- a/lib/sqlalchemy/sql/schema.py
+++ b/lib/sqlalchemy/sql/schema.py
@@ -598,6 +598,9 @@ class Table(DialectKWArgs, SchemaItem, TableClause):
def _init_collections(self):
pass
+ def _reset_exported(self):
+ pass
+
@property
def _autoincrement_column(self):
return self.primary_key._autoincrement_column