Meteor-Community-Packages / Meteor-Community-Packages/meteor-tabular
Use "mongo lookup" of "view" with Tabular
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 360
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
I try to create `view with lookup relation`, and then use it in `meteor-tabular`.
```bash
db.createView (
"orderView",
"order",
[
{
$lookup: {
from: "customer",
localField: "customerId",
foreignField: "_id",
as: "customerDoc"
}
},
{
$unwind: "$customerDoc"
}
]
)
```
```js
let OrderView = new Mongo.Collection('orderView');
...
name : 'order',
collection : OrderView,
columns : [
{data: "_id", title: "ID"},
{
data: "orderDate",
title: "Date",
render: function (val, type, doc) {
return moment(val).format('DD/MM/YYYY');
}
},
{data: "total", title: "Total"},
{data: "des", title: "Description"},
{data: "customerDoc.name", title: "Name"},
],
```
it work fine, but it is slow to react (real time).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report names a MongoDB view with $lookup and a meteor-tabular Mongo.Collection, but no repository files or tests. Start by reproducing the example and measuring reactive update latency; done means the view-backed table responds acceptably to changes in the joined data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb
- Domain
- database, frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100