Using SQLAlchemy 1.4 latest, intending to keep upgrading and moving to 2.x Using ORM with Joined Table Inheritance.
Have an object in the database as an instance of the base class, which has a lot of data in it, and want to upgrade it to be an instance of derived class. So in the examples, promote an plain Employee to be an Engineer or a Manager. If not using ORM and willing to just duplicate code, I would just write the new data to the associated derived table and then change the type field in the base table, but this seem 'crude'. Is there a better way to let me use the ORM structures to actually do some of the work? I don't think I can just create a new derived object with the original primary key, as that will get rejected as a duplicate key, not replace the object. -- Richard Damon -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/b3392a90-5e70-33c3-3955-8bc8f1299916%40Damon-Family.org.