diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-14 20:33:16 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-14 20:33:16 -0400 |
| commit | fce89ccf0c5561ff4747371619646aadc88c37cf (patch) | |
| tree | 2b1d3c86c14c921728ec4333fdc9c3b2828e7952 /lib/sqlalchemy/orm/mapper.py | |
| parent | 800efc75256283770d5c28ddd99f26f341733698 (diff) | |
| download | sqlalchemy-fce89ccf0c5561ff4747371619646aadc88c37cf.tar.gz | |
- [bug] Fixed bug mostly local to new
AbstractConcreteBase helper where the "type"
attribute from the superclass would not
be overridden on the subclass to produce the
"reserved for base" error message, instead placing
a do-nothing attribute there. This was inconsistent
vs. using ConcreteBase as well as all the behavior
of classical concrete mappings, where the "type"
column from the polymorphic base would be explicitly
disabled on subclasses, unless overridden
explicitly.
Diffstat (limited to 'lib/sqlalchemy/orm/mapper.py')
| -rw-r--r-- | lib/sqlalchemy/orm/mapper.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index 57c8de498..9aff3cb85 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -575,6 +575,12 @@ class Mapper(object): self.inherits._inheriting_mappers.add(self) self.passive_updates = self.inherits.passive_updates self._all_tables = self.inherits._all_tables + for key, prop in mapper._props.iteritems(): + if key not in self._props and \ + not self._should_exclude(key, key, local=False, + column=None): + self._adapt_inherited_property(key, prop, False) + def _set_polymorphic_on(self, polymorphic_on): self.polymorphic_on = polymorphic_on @@ -947,7 +953,6 @@ class Mapper(object): # polymorphic_union. # we'll make a separate ColumnProperty for it. instrument = True - key = getattr(col, 'key', None) if key: if self._should_exclude(col.key, col.key, False, col): |
