1
db.cqm.aggregate(
    {
      $match:{node:"ERP-APPLICATION"}},
      {
        $lookup:
       {
          from: "cqm",
          localField: "depends_on.node",
          foreignField: "node",
          as: "depends_on_hardware"
       }
    },
    {
      $lookup:
      {
       from: "cqm",
       localField: "depends_on_hardware.depends_on.node",
       foreignField: "node",
       as: "depends_on_hardware_server"
      }
    }).pretty()

Above is $lookup used in MongoDB. How can I implement this in springboot by using MongoTemplate.

bunny9969
  • 21
  • 3
  • Here is post with answers (using MongoTemplate): [Mongodb $lookup in Spring data mongo](https://stackoverflow.com/questions/36145229/mongodb-lookup-in-spring-data-mongo). – prasad_ May 07 '20 at 11:00

0 Answers0