[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-23 Thread Kevin Horn
On Wed, Sep 23, 2009 at 12:27 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Sep 22, 2009, at 11:59 AM, Kevin H wrote: I'm having some trouble developing my model, and was hoping someone on this list could help... Here's what I want: A BizEntity object A Person and Company

[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-23 Thread Kevin Horn
On Wed, Sep 23, 2009 at 10:57 AM, Kevin Horn kevin.h...@gmail.com wrote: On Wed, Sep 23, 2009 at 12:27 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Sep 22, 2009, at 11:59 AM, Kevin H wrote: I'm having some trouble developing my model, and was hoping someone on this list

[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-23 Thread Conor
You are missing a foreign key column in the people table that corresponds to your Person-Company relation. As a result, SQLAlchemy tries to use person.id as the foreign key column (because that column happens to be a foreign key to a base table of Company) and everything blows up. So: * Add a

[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-23 Thread Kevin Horn
On Wed, Sep 23, 2009 at 5:34 PM, Conor conor.edward.da...@gmail.com wrote: You are missing a foreign key column in the people table that corresponds to your Person-Company relation. As a result, SQLAlchemy tries to use person.id as the foreign key column (because that column happens to be a

[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-22 Thread Michael Bayer
On Sep 22, 2009, at 11:59 AM, Kevin H wrote: I'm having some trouble developing my model, and was hoping someone on this list could help... Here's what I want: A BizEntity object A Person and Company object (both descended from BizEntity, using joined table inheritance) A