We only have a recipe where we assume INHERITS is used like the PG docs say in http://www.postgresql.org/docs/9.0/static/ddl-partitioning.html#DDL-PARTITIONING-IMPLEMENTATION . That is, child tables don't have any extra columns.
In this scenario, SQLAlchemy doesn't need to know about the child tables at all, pretty much. Here's the recipe: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/PostgreSQLInheritance SQLA has no facilities to reflect the INHERITS clause itself. On Feb 23, 2012, at 5:17 AM, Chris Withers wrote: > Hi All, > > Where can I find good example of declaratively mapping model classes to > postgres tables where inheritance is involved? > > (eg: create table foo_2012_02_23 inherits foo) > > Also, if I reflect a database containing tables in this sructure, what will > be reflected? > > Will all parent and child tables be reflected? > > cheers, > > Chris > > -- > Simplistix - Content Management, Batch Processing & Python Consulting > - http://www.simplistix.co.uk > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
