summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/declarative.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-05-07 11:52:14 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-05-07 11:52:14 -0400
commit7adcb1c7443265fc99d05714c964c795f0fe1c13 (patch)
tree22a0d18176d8bffb3a04b7d9fb6c6398010c54ca /lib/sqlalchemy/ext/declarative.py
parent4292c5621973c70b7856a9e32f7173da88572613 (diff)
downloadsqlalchemy-7adcb1c7443265fc99d05714c964c795f0fe1c13.tar.gz
- mapper() will ignore non-configured foreign keys
to unrelated tables when determining inherit condition between parent and child class. This is equivalent to behavior already applied to declarative. [ticket:2153] Also in 0.6.8.
Diffstat (limited to 'lib/sqlalchemy/ext/declarative.py')
-rwxr-xr-xlib/sqlalchemy/ext/declarative.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py
index 8ea76d759..62a117052 100755
--- a/lib/sqlalchemy/ext/declarative.py
+++ b/lib/sqlalchemy/ext/declarative.py
@@ -1058,14 +1058,6 @@ def _as_declarative(cls, classname, dict_):
inherited_mapper = class_mapper(mapper_args['inherits'],
compile=False)
inherited_table = inherited_mapper.local_table
- if 'inherit_condition' not in mapper_args and table is not None:
- # 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
- # parent table is defined within the same MetaData)
- mapper_args['inherit_condition'] = sql_util.join_condition(
- mapper_args['inherits'].__table__, table,
- ignore_nonexistent_tables=True)
if table is None:
# single table inheritance.