Re: [sqlalchemy] autoflush not working on issued query

2018-02-13 Thread Mike Bayer
On Sun, Feb 11, 2018 at 11:15 AM, Antoine Lizée wrote: > > Here is the short example. On the last line, a query is issued to retrieve > the object, but the pending DELETE operation is not triggered by the > autoflush, resulting in an existing object instead of `None`. Can somebody > explain why? >

[sqlalchemy] autoflush not working on issued query

2018-02-13 Thread Antoine Lizée
Here is the short example. On the last line, a query is issued to retrieve the object, but the pending DELETE operation is not triggered by the autoflush, resulting in an existing object instead of `None`. Can somebody explain why? us = Country(name="USA") session.add(us) session.commit() ses