[sqlalchemy] How do I create a child class from a parent class in SQLAlchemy's Joined Table Inheritance?

2012-10-29 Thread Alex Chamberlain
I posted this on StackOverflow (http://stackoverflow.com/q/13109085/961353), but it received no answers so I'm hoping I'll have more luck here. I'm developing a small database where there are far more People than Users, so currently have the following Model.(I'm using Flask-SQLAlchemy and db

Re: [sqlalchemy] How do I create a child class from a parent class in SQLAlchemy's Joined Table Inheritance?

2012-10-29 Thread Michael Bayer
On Oct 29, 2012, at 5:06 AM, Alex Chamberlain wrote: I posted this on StackOverflow (http://stackoverflow.com/q/13109085/961353), but it received no answers so I'm hoping I'll have more luck here. I'm developing a small database where there are far more People than Users, so currently

Re: [sqlalchemy] How do I create a child class from a parent class in SQLAlchemy's Joined Table Inheritance?

2012-10-29 Thread Alex Chamberlain
So, there's no way to upgrade a Person to a User within the normal ORM? Thanks, Alex On Oct 29, 2012 3:00 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Oct 29, 2012, at 5:06 AM, Alex Chamberlain wrote: I posted this on StackOverflow (http://stackoverflow.com/q/13109085/961353), but

Re: [sqlalchemy] How do I create a child class from a parent class in SQLAlchemy's Joined Table Inheritance?

2012-10-29 Thread Michael Bayer
there's an old ticket proposing to add the feature of changing the class of an item but it has many tricky turns and corners and hasn't been worth the large amount of effort it would take to make it work perfectly in all cases. It is of course much easier to do with single-table inheritance,

Re: [sqlalchemy] How do I create a child class from a parent class in SQLAlchemy's Joined Table Inheritance?

2012-10-29 Thread Alex Chamberlain
Thanks for your help. I've taken your advice and User inherits from db.Model only and I've defined a relationship back to Person. It would be cool if in the future you could walk up and down the object tree, but this is my first project with SQLAlchemy. Thanks again, it's very much