Details
-
New Feature
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
Description
another way to implement cross-collections joins.
ex: 2 collections: Books and Authors.
|
|
book = { _id:1, title: 'A', author_id: 1 } |
author = { _id: 1, name: 'Me' } |
|
|
db.aggregate(
|
{$collection: 'book', $match: ...}, |
{$collection: 'author', $match: ...}, |
...
|
{$group: ...},
|
{$project: ...}
|
)
|
in result (example too):
books_with_authors = [
|
{_id:1, title: 'A', author: { _id: 1, name: 'Me' }}, |
...
|
]
|
Attachments
Issue Links
- duplicates
-
SERVER-19095 $lookup
-
- Closed
-