Meteor-Community-Packages / Meteor-Community-Packages/meteor-tabular
Collection with ObjectID as _id won't update.
- Dominant language
- JavaScript
- Stars
- 360
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
Let's say I have declared collection as follows.
``` javascript
Books = new Mongo.Collection("books", {idGeneration :"MONGO"});
```
and crated tabular table with following selector
``` javascript
TabularTables.BooksTable = new Tabular.Table({
name: "BooksTable",
collection: Books,
columns: [
......
],
selector: function( userId ) {
return { userId: new Mongo.ObjectID(userId),isDeleted: false}
}
});
```
What's working and what's not?
1. Creation a doc will update table UI : `Yes`
2. Editing of visible fields will update UI: `Yes`
3. marking `isDeleted` filed to `true` will remove row: `No`
Is this bug due to using ObjectID as _id?
Yes, because changing collection declaration as below will make row disappear when `isDeleted` field is set to true.
``` javascript
Books = new Mongo.Collection("books"});
```
Contributor guide
Research direction
Start by reproducing the issue with a Mongo.Collection using idGeneration: "MONGO" and a Tabular.Table selector containing a Mongo.ObjectID userId and isDeleted: false. Compare the table behavior when isDeleted changes to true with MONGO and default IDs; done means the matching row is removed in both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb
- Domain
- database, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100