summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/declarative.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-06-14 10:08:34 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-06-14 10:08:34 -0400
commit23a14f29da6607ee78f95c4bff9af7768c6e7954 (patch)
tree03c4a0ab2d87a38db4a63bab4273d7738bf175af /lib/sqlalchemy/ext/declarative.py
parenteaa7aa4239af4f42cdb8b370120d1538c6704d6b (diff)
downloadsqlalchemy-23a14f29da6607ee78f95c4bff9af7768c6e7954.tar.gz
- Fixed declarative bug where a class inheriting
from a superclass of the same name would fail due to an unnecessary lookup of the name in the _decl_class_registry. [ticket:2194]
Diffstat (limited to 'lib/sqlalchemy/ext/declarative.py')
-rwxr-xr-xlib/sqlalchemy/ext/declarative.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py
index 62a117052..86fa8f355 100755
--- a/lib/sqlalchemy/ext/declarative.py
+++ b/lib/sqlalchemy/ext/declarative.py
@@ -1038,8 +1038,7 @@ def _as_declarative(cls, classname, dict_):
if 'inherits' not in mapper_args:
for c in cls.__bases__:
if _is_mapped_class(c):
- mapper_args['inherits'] = cls._decl_class_registry.get(
- c.__name__, None)
+ mapper_args['inherits'] = c
break
if hasattr(cls, '__mapper_cls__'):