# Issue
最近使用 Mongodb 創建 collection 時,創建名為 project.share.group
的集合時會創建成功,并且代碼顯示數據已保存到集合,在 shell 中也能夠通過 show collections
能夠查看到對應集合
但是通過 db.project.share.group.find()
命令顯示數據時報錯,顯示TypeError: db.project.share.group.find is not a function
# Solution
通過 db.getCollection("project.share.group").find()
可成功獲取
因為 group
在 mongodb 屬于保留字段,當出現時 mongodb 會有另外的意義(具體待 Google~)