About refreshing objects in sqlalchemy session

前端 未结 4 793
醉话见心
醉话见心 2021-02-01 04:11

Well, I am dealing with a doubt about sqlalchemy and objects refreshing!

I am in the situation in what I have 2 sessions, and the same object has been queried in both se

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-01 04:24

    I just had this issue and the existing solutions didn't work for me for some reason. What did work was to call session.commit(). After calling that, the object had the updated values from the database.

提交回复
热议问题