...当我尝试执行如下所示的查询时:
Session().query(MyMappedClass).update({MyMappedClass.time:func.now()})
我得到:
InvalidRequestError: Could not evaluate current criteria in Python. Specify 'fetch' or False for the synchronize_session parameter.
但如果我这样做:
Session().query(MyMappedClass).update({MyMappedClass.time:'now()'})
...有用。有谁知道为什么?