On Thu, Oct 26, 2017 at 4:13 PM, <[email protected]> wrote: > Thanks Mike! > > My code actually only uses session.delete(obj), at no place does it issue > statements directly. Since this is running in the context of requests for a > web server (as per this Pyramid cookiecutter), could it be that two requests > attempt to delete the same resource, with one succeeding and the other not?
it does serve as a rudimentary concurrency check if you are using isolation below repeatable read, so depending on specifics yes that could be happening as well. > > Cheers, > Jens > > > On Thursday, October 26, 2017 at 11:24:54 PM UTC+10, Mike Bayer wrote: >> >> >> it means the ORM emitted a statement like: >> >> DELETE FROM your_table WHERE primary_key=<X> >> >> and then there was no row with "X". This is not supposed to happen, >> and is usually an indicator that ORM-level code is causing a delete of >> the same row more than once. Such as, emitting a DELETE statement >> and then also saying session.delete(some_object). You'd want to >> understand why this is happening and then if you identify it as an >> unavoidable situation, set up that flag. >> >> > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
