DDCODE

Share programming skills from Magic Oriental

upArrow

Mongoose Aggregates Good Data

 May 12, 2019   mongodb, question

图片描述

The aggregate statement executed by mongo client can find out the data, but mongoose is an empty array. What is the situation?

const mongoose = require('mongoose')
 let ObjectIds = mongoose.Types.ObjectId
 {$match: {"extra.integralId": new ObjectIds(query._id)}}

You need to construct an ObjectId to query it

Related Posts:

  • How do mongodb aggregates view query performance?
  • Mongo aggregates query groups to find the maximum value
  • Mongodb Aggregates by Date, Counts
  • Insert data with mongoose; Then use mongodb shell to…
  • Is Linux operating system a good development…
  • Is there any middleware similar to mongoose that…
  • The fields in mongoose query table are arrays to…
  • How to view the data in Mongoose database.
  • Using mongoose to query longitude and latitude…
<< When MongoDB is installed as a Windows service, it always reports an error. The log file already exists in I CONTROL [main] log file “ How does mongodb solve the skip result caused by inserting data while skipping data >>

Related Posts:

  • How do mongodb aggregates view query performance?
  • Mongo aggregates query groups to find the maximum value
  • Mongodb Aggregates by Date, Counts
  • Insert data with mongoose; Then use mongodb shell to…
  • Is Linux operating system a good development…
  • Is there any middleware similar to mongoose that…
  • The fields in mongoose query table are arrays to…
  • How to view the data in Mongoose database.
  • Using mongoose to query longitude and latitude…

Tags

Android android-studio apache c c++ centos Css css3 Database Docker Eclipse Express Front end git GitHub golang Html html5 Ios java javascript Jquery Laravel linux macos mongodb mysql Nginx node.js npm objective-c php Programmer python redis ruby shell Spring Sql Swift ubuntu vim vue.js Web xcode

Powered by MyWiki WordPress Theme