diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-06-18 00:08:46 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-06-18 00:08:46 -0400 |
commit | 30af29c7aa608e0aaba00f70f0a569379bbb4645 (patch) | |
tree | cef9923b9f8b3bb834f37cd27aa0f7023b8e6713 /lib/sqlalchemy/ext/declarative.py | |
parent | 40f77086817371bb5ec59d9309f8177ef053b076 (diff) | |
download | sqlalchemy-30af29c7aa608e0aaba00f70f0a569379bbb4645.tar.gz |
remove ambiguous language
Diffstat (limited to 'lib/sqlalchemy/ext/declarative.py')
-rwxr-xr-x | lib/sqlalchemy/ext/declarative.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py index d7a9c8deb..23346730f 100755 --- a/lib/sqlalchemy/ext/declarative.py +++ b/lib/sqlalchemy/ext/declarative.py @@ -403,8 +403,8 @@ table:: Note that above, the ``Engineer.id`` attribute, since it shares the same attribute name as the ``Person.id`` attribute, will in fact -represent the ``people.id`` and ``engineers.id`` columns together, and -will render inside a query as ``"people.id"``. +represent the ``people.id`` and ``engineers.id`` columns together, +with the "Engineer.id" column taking precedence if queried directly. To provide the ``Engineer`` class with an attribute that represents only the ``engineers.id`` column, give it a different attribute name:: @@ -415,6 +415,11 @@ only the ``engineers.id`` column, give it a different attribute name:: primary_key=True) primary_language = Column(String(50)) + +.. versionchanged:: 0.7 joined table inheritance favors the subclass + column over that of the superclass, such as querying above + for ``Engineer.id``. Prior to 0.7 this was the reverse. + Single Table Inheritance ~~~~~~~~~~~~~~~~~~~~~~~~ |