’玊尔’ 2022-01-03 00:35 采纳率: 100%
浏览 16
已结题

nosql多文本插入报错

img

img


少年:
db.comment.insertMany([ {"_id":"1","articleid":"100000","content":"今天是个阴天,注意保暖","userid":"1001","nickname":"Rose","age":"20","phone":"18807141995","createdatetime":new Date ("2021-10-20 06:44:40.495"),"likenum":NumberInt(10),"state":null}, {"_id":"2","articleid":"100001","content":"今天是10月27日,阴天,星期三","userid":"1002","nickname":"lilei","age":"21","phone":"17011112222","createdatetime":new Date ("2021-10-27 06:29:46.357"),"likenum":NumberInt(20),"state":"1"}, {"_id":"3","articleid":"100002","content":"迈开腿,多喝水","userid":"1003","nickname":"jake","age":"22","phone":"18011012220","createdatetime":new Date ("2021-10-27 06:29:46.357"),"likenum":NumberInt(23),"state":"2"}, {"_id":"4","articleid":"100003","content":"西安职业技术学院大数据应用学院","userid":"1004"."nickname":"nosql","age":"19","phone":"0298727661","createdatetime":new Date ("2021-10-27 06:29:46.357"),"likenum":NumberInt(5),"state":null}, {"_id":"5","articleid":"100004","content":"非关系型数据库","userid":"1005","nikename":"mongodb","age":"17","phone":"13456783333","createdatetime":new Date ("2021-10-27 06:29:46.357"),"likenum":NumberInt(9),"state":null}, {"_id":"6","articleid":"100005","content":"一号教 学楼四楼机房","userid":"1006","nikename":"nosql","age":"17","phone":"13456783333","createdatetime":new Date ("2021-10-27 06:29:46.375"),"likenum":NumberInt(9),"state":null} ])

  • 写回答

1条回答 默认 最新

  • CSDN专家-sinJack 2022-01-03 00:44
    关注

    id 为4这个对象中

    "userid":"1004".
    改为
    "userid":"1004",
    
    {"_id":"4","articleid":"100003","content":"西安职业技术学院大数据应用学院","userid":"1004","nickname":"nosql","age":"19","phone":"0298727661","createdatetime":new Date ("2021-10-27 06:29:46.357"),"likenum":NumberInt(5),"state":null}, 
    

    img

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录

报告相同问题?

问题事件

  • 系统已结题 1月11日
  • 已采纳回答 1月3日
  • 创建了问题 1月3日

悬赏问题

  • ¥15 (标签-python|关键词-char)
  • ¥15 python+selenium,在新增时弹出了一个输入框
  • ¥15 苹果验机结果的api接口哪里有??单次调用1毛钱及以下。
  • ¥20 学生成绩管理系统设计
  • ¥15 来一个cc穿盾脚本开发者
  • ¥15 CST2023安装报错
  • ¥15 使用diffusionbert生成文字 结果是PAD和UNK怎么办
  • ¥15 有人懂怎么做大模型的客服系统吗?卡住了卡住了
  • ¥20 firefly-rk3399上启动卡住了
  • ¥15 如何删除这个虚拟音频