我有一个partner collection
和我pymongo
用来检索数据
当我使用MongoDB查询集合时,我看到以下结果
db.partner.find({'unique_key': 'c89dbe313932008febde61cdd2a071a1d'},{})
{ "_id" : ObjectId("4eb463cb158acb554e8c9c11"), "unique_key" : "c89dbe313932008febde61cdd2a071a1d", "name" : "ABC", "primary_key" : 12 }
Run Code Online (Sandbox Code Playgroud)
但是当我通过pymongo查询时,这就是我所做的
for document in collection.find(find, criteria):
print document
where find = {'unique_key': 'c89dbe313932008febde61cdd2a071a1d'} and
criteria = {}
Run Code Online (Sandbox Code Playgroud)
这是我在结果中看到的:
{u'_id': ObjectId('4eb463cb158acb554e8c9c11')}
Run Code Online (Sandbox Code Playgroud)
而且我没有得到name和primary_key,我错过了什么?
谢谢
归档时间: |
|
查看次数: |
21194 次 |
最近记录: |