diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-05-07 11:52:14 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-05-07 11:52:14 -0400 |
commit | 7adcb1c7443265fc99d05714c964c795f0fe1c13 (patch) | |
tree | 22a0d18176d8bffb3a04b7d9fb6c6398010c54ca /lib/sqlalchemy/ext/declarative.py | |
parent | 4292c5621973c70b7856a9e32f7173da88572613 (diff) | |
download | sqlalchemy-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-x | lib/sqlalchemy/ext/declarative.py | 8 |
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. |