balderdashy / balderdashy/sails
sails-mongo cant find some ObjectID's starts with 6
- Dominant language
- JavaScript
- Stars
- 22.8k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
**Node version**: 10
**Sails version** _(sails)_: 1.2.4
**ORM hook version** _(sails-hook-orm)_: 3.0.1
**Sockets hook version** _(sails-hook-sockets)_: -
**Organics hook version** _(sails-hook-organics)_: -
**Grunt hook version** _(sails-hook-grunt)_: -
**Uploads hook version** _(sails-hook-uploads)_: -
**DB adapter & version** _(e.g. sails-mysql@5.55.5)_: sails-mongo@2.0.0
**Skipper adapter & version** _(e.g. skipper-s3@5.55.5)_: -
Recently, probablya after Mongo Atlas upgrade to 4.0, sails-mongo can't seem to find ID's starting with 6.
For example;
`Model.findOne({ id: '5f6dec64b3471800aca76559' )}` returns result
`Model.findOne({ id: '60e58bc917317c00ae752f04' )}` returns undefined
I can also confirm this record exists on MongoDB Atlas dashboard.
it's a weird one.
Contributor guide
Research direction
Start by reproducing the two Model.findOne queries with sails-mongo@2.0.0 against MongoDB Atlas 4.0, using the Node 10 and Sails 1.2.4 versions reported. Trace the adapter's handling of IDs beginning with 6 and verify the existing record is returned; done means both example lookups behave consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb, node.js
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100