]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
added small clarification on single-table inheritance mapper def
authorRick Morrison <rickmorrison@gmail.com>
Sat, 3 Nov 2007 16:11:41 +0000 (16:11 +0000)
committerRick Morrison <rickmorrison@gmail.com>
Sat, 3 Nov 2007 16:11:41 +0000 (16:11 +0000)
doc/build/content/mappers.txt

index 70f5a1039983a6a3846eb430d903ffb69e9afe51..55642fa1e92a8f6769765ea3dcb7d70d41eca372 100644 (file)
@@ -432,6 +432,8 @@ Single table inheritance is where the attributes of the base class as well as al
     manager_mapper = mapper(Manager, inherits=employee_mapper, polymorphic_identity='manager')
     engineer_mapper = mapper(Engineer, inherits=employee_mapper, polymorphic_identity='engineer')
 
+Note that the mappers for the derived classes Manager and Engineer omit the specification of their associated table, as it is inherited from the employee_mapper. Omitting the table specification for derived mappers in single-table inheritance is required.
+
 ##### Concrete Table Inheritance
 
 This form of inheritance maps each class to a distinct table, as below: