On Fri, Mar 16, 2018 at 6:23 PM, Jonathan Vanasco <jvana...@gmail.com> wrote: > I'm refactoring a large table and moving some write-heavy columns into their > own table > > Is there a way to automatically create the child when the parent is > generated, or must this be done manually?
this is the usual, "do it in the __init__() method" or "use the init() event" approach. Plenty of ways to intercept when an object is "generated" (which in this case I assume means instantiated as transient). > > I couldn't find anything in the docs. > > This is almost a variant of inherited tables, but there are actually 3 > different child tables with 1:1 relationships. > > -- > 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 post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at https://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- 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 post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.