summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/declarative.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/ext/declarative.py')
-rw-r--r--lib/sqlalchemy/ext/declarative.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py
index b7ae47edf..a26156844 100644
--- a/lib/sqlalchemy/ext/declarative.py
+++ b/lib/sqlalchemy/ext/declarative.py
@@ -311,7 +311,7 @@ def _as_declarative(cls, classname, dict_):
inherits = cls._decl_class_registry.get(inherits.__name__, None)
if inherits:
mapper_args['inherits'] = inherits
- if not mapper_args.get('concrete', False) and table:
+ if not mapper_args.get('concrete', False) and table and 'inherit_condition' not in mapper_args:
# figure out the inherit condition with relaxed rules
# about nonexistent tables, to allow for ForeignKeys to
# not-yet-defined tables (since we know for sure that our