我在 SQLAlchemy 中编写了以下查询:
session.query(matches_atp).filter(matches_atp.ID_M == 668)
WHERE
当我检查它时,我得到一个奇怪的条款:
WHERE belgarath.matches_atp.`ID_M` = %(ID_M_1)s
当我切换到:
session.query(matches_atp).filter(matches_atp.ID_M == None)
然后一切看起来都很好:
WHERE belgarath.matches_atp.`ID_M` IS NULL
为什么我得到的%(ID_M_1)s
不是668
?
如果这不是一个简单的答案,那么我将发布 MRE 的代码。
蓝山帝景
相关分类