Hi Michael,
Thanks for the reply.
It was a pity that Openstack would only support Mysql ONLY.
And for this problem, I would dig into the code for more first.
Will let you know if I found more.
Thanks agagin!
--Jinrong
在 2017年11月13日星期一 UTC+8下午10:32:21,Mike Bayer写道:
> On Mon, Nov 13, 2017 at 2:14
Can you explain why you actually want to do this? There might be
better options than before_flush, but we'd need to know exactly what
you're trying to do first.
Simon
On Thu, Nov 16, 2017 at 12:55 PM, wrote:
> That makes sense, thank you, Simon!
>
> Regarding the events: you suggest to use a be
That makes sense, thank you, Simon!
Regarding the events: you suggest to use a before_flush() to examine
session.dirty whenever a session.query() executes?
Also, is there a way to get the list of objects that have been flushed, or
should I track them myself whenever a before_flush() event occur
On Thu, Nov 16, 2017 at 7:45 AM, wrote:
> Hello,
>
> I've been exploring some of the session functionality that handles object
> states, and I'm quite confused. Here is what I see:
>
engine = engine_from_config({'sqlalchemy.url': 'mysql+pymysql://…'})
session_factory = sessionmaker(bind