DetachedInstanceError

sqlalchemy.orm.exc.DetachedInstanceError: Instanceis not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)

在使用sqlalchemy 的orm时,在一个循环中,如果一开始select时用了session,中间update某条记录后,session被关闭,就会出现对象not bound to a Session的问题. DBSession = sessionmaker(bind=self.engine,e ......
共1篇  :1/1页 首页上一页1下一页尾页