Skip to content

Commit

Permalink
Update mongoose-join-query.md
Browse files Browse the repository at this point in the history
  • Loading branch information
utdevnp authored Aug 25, 2022
1 parent 9bfd85e commit 38ea037
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions mongoose-join-query.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@

const notification = await HistoryModel.aggregate([
{
$lookup: {
from: "pages",
localField: "pageId",
foreignField: "_id",
as: "page",
},
},
```
return await TestModel.aggregate([
{
$lookup: {
from: "customers",
Expand All @@ -19,7 +12,7 @@
{
$match: QueryData,
},
{ $unwind: "$page" },
{ $unwind: "$customer" },
{
$sort: {
Expand All @@ -28,6 +21,6 @@
},{
$limit:5
}


]);
```

0 comments on commit 38ea037

Please sign in to comment.