[sqlalchemy] Re: Metadata - Inherited Tables, Columns

2009-04-13 Thread az
Is there a way of telling if a table is inherited from another table and which tables it inherits from in the Metadata? inheritance is not really sql notion... so a) look at the mapper.inherits (towards root) and/or mapper.polymorphic_itereator() (towards leafs) b) see if table's primary

[sqlalchemy] Re: Metadata - Inherited Tables, Columns - PostGreSQL

2009-04-13 Thread Jarrod Chesney
Thanks, I'll look at that but it doesn't sound very concrete. IE using a foreign key to see if somethings inherited. Question 1 From the sqlalchemy mapper configuration, PostGreSQLs version of inheritence sounds like the concrete variary, as it automatically joins the tables together with a

[sqlalchemy] Re: Metadata - Inherited Tables, Columns

2009-04-13 Thread Jarrod Chesney
I'll look into a) do the mappers pick up foreign key constraints and the polymorphic/inherited details from the metadata when their created or do you have to specify them? - As a last resort i can query the data dictionary. Question 1 From the sqlalchemy mapper configuration, PostGreSQLs version

[sqlalchemy] Re: Metadata - Inherited Tables, Columns

2009-04-13 Thread az
On Tuesday 14 April 2009 00:13:10 Jarrod Chesney wrote: I'll look into a) do the mappers pick up foreign key constraints and the polymorphic/inherited details from the metadata when their created or do you have to specify them? both, if ambigious u have to specify manualy. dunno about the