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
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
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
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,
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