title: Mongoose Populate Multiple Fields
body: <p>I am trying to use Mongoose like a relational db.  I have a task schema that needs to reference client, user and note schemas.</p>
  
  <p>I have found many examples for populating one schema with another, but none for when I need to populate more than one.  I have tried the following links:
  <a href="https://mongoosejs.com/docs/populate.html" rel="nofollow noreferrer">https://mongoosejs.com/docs/populate.html</a>
  <a href="http://ronaldroe.com/populating-multiple-fields-and-levels-with-mongoose/" rel="nofollow noreferrer">http://ronaldroe.com/populating-multiple-fields-and-levels-with-mongoose/</a></p>
  
  <pre><code>findAll: function (req, res) {
      Task
        .find(req.query)
        .sort({ date: -1 })
        // populate associated user
        .populate("user", "_id firstName lastName")
        // populate associated client
        .populate("client", "_id name")
        // all notes for the task and when they were created
        .populate("note", "_id content created_at")
        .then(dbModel =&gt; {
          res.status(200).json({
            tasks: dbModel.map(model =&gt; {
              return {
                _id: model._id,
                user: model.user,
                client: model.client,
                assignDate: model.assignDate,
                assignedStatus: model.assignedStatus,
                completionStatus: model.completionStatus,
                description: model.description,
                note: model.note,
              };
            })
          })
        })
        .catch(err =&gt; res.status(422).json(err));
    }
  </code></pre>
  
  <p>When I do a GET request for this data, I get the following:</p>
  
  <pre><code>"tasks": [
          {
              "_id": "5d6980d8459a8b9f0e133d04",
              "user": [
                  {
                      "_id": "5d6afd8a101f355244adfd9a",
                      "firstName": "Dexter",
                      "lastName": "Morgan"
                  }
              ],
              "assignDate": "2018-12-09T00:00:00.000Z",
              "assignedStatus": "true",
              "completionStatus": "in-progress",
              "description": "This client needs to be contacted for future sales"
          }
  ]
  </code></pre>
  
  <p>I want to also get the client id and name as well as all notes associated with this task.</p>