Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. db.request_response.aggregate([
  2. {
  3. $lookup: {
  4. from: "projects",
  5. localField: "project_id",
  6. foreignField: "project_id",
  7. as: "project"
  8. }
  9. },
  10. {
  11. $unwind: "$project"
  12. },
  13. {
  14. $lookup: {
  15. from: "scenarios",
  16. localField: "scenario_id",
  17. foreignField: "scenario_id",
  18. as: "scenario"
  19. }
  20. },
  21. {
  22. $unwind: "$scenario"
  23. },
  24. {
  25. $lookup: {
  26. from: "flows",
  27. localField: "flow_id",
  28. foreignField: "flow_id",
  29. as: "flow"
  30. }
  31. },
  32. {
  33. $unwind: "$flow"
  34. }
  35. ])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement