我有以下代码:
employees = Employee.all()
employees.projection('first_name')
employees.filter('passport_id =', passport_id)
employees.order('-added')
results = employees.fetch(5)
不允许第二行:
AttributeError: 'Query' object has no attribute 'projection'
另一种方法也会返回错误:
employees = db.Query(Employee, projection=('first_name'))
TypeError: __init__() got an unexpected keyword argument 'projection'
但如果我正确阅读the doc,则应该支持它。