diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-11-12 15:43:17 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-11-12 15:43:17 +0000 |
| commit | 0148adec3069c64f3dca8d269e4c0fac3fe6bcaf (patch) | |
| tree | 3c51cb7bc367da1299ac800f027ccc242e949ad7 /lib/sqlalchemy | |
| parent | 260c201f656ce3afe35f9ae069cdf46593d4dffb (diff) | |
| download | sqlalchemy-0148adec3069c64f3dca8d269e4c0fac3fe6bcaf.tar.gz | |
- Can now use a custom "inherit_condition" in
__mapper_args__ when using declarative.
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/ext/declarative.py | 2 |
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 |
