title: Hello,I have 3 collections how to make a join to select the data with a single request?
body: <p>I have three collections in mongodb i want to join them to get some datas.
  this is my Schema:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>//user collection
  {
      "_id": "616b429e0de99f6f74f911b9",
      "name": {
          "firstname": "Kisko",
          "lastName": "Barrisson"
      }
  }
  //Devices collection
  {
      _id:"616b52453dcacbf8a3f989a8",
      user:"616b429e0de99f6f74f911b9",
      name:"driver",
      data:[{X:123,Y:200},{X:124,Y:300}]
  }
  
  //locations collection
  {
      "_id": {
          "$oid": "6193b7a7751212e5358b481a"
      },
      "X": 123,
      "Y":200,
      "adresse":"My current adresse"
  }</code></pre>
  </div>
  </div>
  </p>
  <p>I would like to do something like: <code>&quot;Select l.adresse,d.name,u.name from user u LEFT JOIN devices d ON u._id=d.user LEFT JOIN locations l ON l.X = d.X AND L.Y=d.Y WHERE u._id=616b429e0de99f6f74f911b9&quot;</code>.
  How can i do that using mongoose.
  Help me please!</p>