Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

Fix array for _id in find with $in not being converted to ObjectId. #129

Merged
merged 1 commit into from Jun 28, 2016
Merged

Fix array for _id in find with $in not being converted to ObjectId. #129

merged 1 commit into from Jun 28, 2016

Conversation

brianvanburken
Copy link
Contributor

A query to find documents by _id does not work. An example of this query is:

const documents = await Model.find({ _id: { 
  $in: [ '576920dcde4ff8858d61efab', '576920dcde4ff8858d61efac' ] 
} } );¬

The whole parsing logic is skipped while using a query like { _id: '576920dcde4ff8858d61efab' } gets parsed.

@coveralls
Copy link

coveralls commented Jun 21, 2016

Coverage Status

Changes Unknown when pulling 5596a37 on brianvanburken:fix-id-to-objectid-logics into * on vdemedes:master*.

@brianvanburken
Copy link
Contributor Author

@vdemedes could you look into this PR? This fixes a bug that has affected us here. We would love to see this fixed :).

@vadimdemedes vadimdemedes merged commit 98f46c8 into vadimdemedes:master Jun 28, 2016
@vadimdemedes
Copy link
Owner

Merged, thank you a lot! Sorry about such a late response.

@brianvanburken
Copy link
Contributor Author

Awesome! Thank you so much! ❤️ 💚 💙 💛 💜

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants