From: Mike Bayer Date: Mon, 18 Jun 2012 04:08:46 +0000 (-0400) Subject: remove ambiguous language X-Git-Tag: rel_0_7_9~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae7120d8038420878946db306ce36c552c82a252;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git remove ambiguous language --- diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py index ac00c8a9c4..6b804036c3 100755 --- a/lib/sqlalchemy/ext/declarative.py +++ b/lib/sqlalchemy/ext/declarative.py @@ -400,8 +400,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:: @@ -412,6 +412,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 ~~~~~~~~~~~~~~~~~~~~~~~~