Meteor-Community-Packages / Meteor-Community-Packages/ground-db

MongoId strings not returning.

Open
#195 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
569
Forks
77
PR merge metrics
No merged PRs in 30d

Description

I have a Ground subscription that contains MongoIDs in string form as the main id. When I do a find, it lists it out, however when I do a find or findOne on the id, it doesn't return anything.

Here's an example of one that fails:

`DRAFTS.findOne({_id:"58d887874e0ca825443236cf"})`

I suspect that it has something to do with mongo-id package and this function: `MongoID._looksLikeObjectID(id)`

I haven't been able track it down at all though.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failing findOne call with the string-form _id, then inspect MongoID._looksLikeObjectID and the mongo-id package behavior it relies on. Done means find and findOne return the record for the supplied string ID, while preserving the existing behavior for other IDs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.