我有三个类:PurchaseOrder、PurchaseOrderLine、Item
PurchaseOrder 子项是与Item 相关的PurchaseOrderLine。
pos = DBSession.query(m_po.PO).filter(or_(
m_po.PO.number == query,
m_po.POLine.item.code == query
)).join(m_po.POLine).join(m_im.Item)
给我 ...
AttributeError: Neither 'InstrumentedAttribute' object nor 'Comparator' object has an attribute 'code'