我正在使用JSON SQLAlchemy列,我的查詢語句需要'has_key'屬性,但顯然我的'Comparator'對象沒有這個屬性。SQLAlchemy的比較器對象沒有屬性'has_key'
Transaction.query.filter(Transaction.fields.has_key('issuername')).all()
其中Transaction.fields是列(JSON)。我得到錯誤「AttributeError:與Transaction.fields關聯的'InstrumentedAttribute'對象和'Comparator'對象都沒有屬性'has_key'」。我的SQLAlchemy是最新版本1.09。我建立這個查詢是錯誤的?