Meteor-Community-Packages / Meteor-Community-Packages/meteor-tabular

Use "mongo lookup" of "view" with Tabular

Open
#374 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.