orm中多表查询示例

 

record = session.query(OrderMain, OrderGoods).join(OrderMain, OrderMain.order_code == OrderGoods.order_code).
filter(OrderMain.order_code == "O20211224163007980121369").first()

 搜 sqlalchemy orm left join、join、right join

posted @ 2023-01-13 09:41  奈何技术不达标  阅读(15)  评论(0编辑  收藏  举报