From: Mike Bayer Date: Fri, 28 Mar 2014 15:05:46 +0000 (-0400) Subject: clarify doc here X-Git-Tag: rel_0_9_4~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9cdbed37f8c420db0b42fb959813d079622c3f3a;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git clarify doc here --- diff --git a/lib/sqlalchemy/ext/automap.py b/lib/sqlalchemy/ext/automap.py index 1f9e00a12f..dfc838da31 100644 --- a/lib/sqlalchemy/ext/automap.py +++ b/lib/sqlalchemy/ext/automap.py @@ -350,10 +350,10 @@ given as follows:: The foreign key from ``Engineer`` to ``Employee`` is used not for a relationship, but to establish joined inheritance between the two classes. -Note that this means automap will not generate **any relationships** that are -between these two classes, nor for any other classes in the same hierarchy. -If there are actually relationships between classes in the hierarchy, they -must be declared explicitly. Below, as we have two separate foreign keys +Note that this means automap will not generate *any* relationships +for foreign keys that link from a subclass to a superclass. If a mapping +has actual relationships from subclass to superclass as well, those +need to be explicit. Below, as we have two separate foreign keys from ``Engineer`` to ``Employee``, we need to set up both the relationship we want as well as the ``inherit_condition``, as these are not things SQLAlchemy can guess::