用mongodb创建集合之后死活不能插入数据

> db.createCollection('version');
{ "ok" : 1 }
> db.version.drop();
2020-01-14T15:35:27.868+0800 E QUERY    [thread1] TypeError: db.version.drop is not a function :
@(shell):1:1
> db.version.find();
2020-01-14T15:35:34.980+0800 E QUERY    [thread1] TypeError: db.version.find is not a function :
@(shell):1:1
> db.version.insert()
2020-01-14T15:35:46.161+0800 E QUERY    [thread1] TypeError: db.version.insert is not a function :
@(shell):1:1

问题出在哪里?
答:不要用"version"这个名字,换个集合名字就好了。

相关文章:

  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2021-07-08
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2021-11-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2022-12-23
  • 2022-01-11
相关资源
相似解决方案