From: Rick Morrison Date: Sat, 3 Nov 2007 16:11:41 +0000 (+0000) Subject: added small clarification on single-table inheritance mapper def X-Git-Tag: rel_0_4_1~72 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8dd51943a01049a4680f051960dbef4f0fae371e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git added small clarification on single-table inheritance mapper def --- diff --git a/doc/build/content/mappers.txt b/doc/build/content/mappers.txt index 70f5a10399..55642fa1e9 100644 --- a/doc/build/content/mappers.txt +++ b/doc/build/content/mappers.txt @@ -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: