Hi Mike, Thanks for your quick response. And quick patch! I look forward to the 1.2.17 release.
On Tue, Jan 22, 2019 at 10:03 PM Mike Bayer <mike...@zzzcomputing.com> wrote: > On Tue, Jan 22, 2019 at 4:49 PM Daniel Lister <mrhu...@gmail.com> wrote: > > Not as much of an issue but inserts are also not handled. > > the Query object doesn't do INSERTs, INSERTs are controlled by > creating an instance of your mapped class with the desired values upon > it. I would imagine if tenant_id is required, you simply make that a > NOT NULL column in your table (which it would be anyway) then have > tenant_id be the first argument positional argument on all __init__() > methods. Or use the "init" mapper event which is called alongside > __init__(). There are lots of other ways to get at INSERTs too as > well as UPDATE/DELETE within the normal ORM flush process (e.g. not > bulk update() or delete()) using the mapper or session hooks.. How > you organize these depends on the coding patterns you seek to use > (e.g. explicit call everywhere, pulling from a thread local registry, > etc.) > > > > > 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 a topic in the > Google Groups "sqlalchemy" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sqlalchemy/20ieAvQCp_4/unsubscribe. > To unsubscribe from this group and all its topics, 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. > -- -Daniel -- 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.