diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-10-01 09:42:21 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-10-01 09:42:21 -0400 |
| commit | 9bfd0289383bfcaf650fe516862df545dcf95c2e (patch) | |
| tree | 758b9c425a9f77f786d3bc137fce5a9eb7d17269 /lib/sqlalchemy/ext/declarative | |
| parent | dce32062236001ed89258cfe60c89bbca5db18c5 (diff) | |
| download | sqlalchemy-9bfd0289383bfcaf650fe516862df545dcf95c2e.tar.gz | |
- some documentation hits
Change-Id: I468fe70168804b08cf0d5e8b57e235bca904b1ff
Diffstat (limited to 'lib/sqlalchemy/ext/declarative')
| -rw-r--r-- | lib/sqlalchemy/ext/declarative/api.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/ext/declarative/api.py b/lib/sqlalchemy/ext/declarative/api.py index b2e8b5afe..d02db7aa5 100644 --- a/lib/sqlalchemy/ext/declarative/api.py +++ b/lib/sqlalchemy/ext/declarative/api.py @@ -42,6 +42,15 @@ def instrument_declarative(cls, registry, metadata): def has_inherited_table(cls): """Given a class, return True if any of the classes it inherits from has a mapped table, otherwise return False. + + This is used in declarative mixins to build attributes that behave + differently for the base class vs. a subclass in an inheritance + hierarchy. + + .. seealso:: + + :ref:`decl_mixin_inheritance` + """ for class_ in cls.__mro__[1:]: if getattr(class_, '__table__', None) is not None: |
