gpt4 book ai didi

mongodb - 在mongodb集合中查找字段等于给定整数值的文档

转载 作者:可可西里 更新时间:2023-11-01 10:42:00 26 4
gpt4 key购买 nike

我想找到字段 property_id 等于 -549 的所有文档。我试过:

db.getCollection('CollectionName').find({'property_id' : -549 })

这将不返回任何记录并显示一条消息:“已获取 0 条记录。”

但我看到文档就在那里,其中字段 property_id 是 -549。我不确定我做错了什么。字段类型为int32。

Here are the first two fields of the document that I am looking to find with the query

最佳答案

检查字段名'property_id'是否有空格:尝试

db.getCollection('CollectionName').find({'\uFEFFproperty_id' : -549 })

关于mongodb - 在mongodb集合中查找字段等于给定整数值的文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39486564/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com