Cast _id: number to string
Every time I type { _id: 12345 } in the Filter, I get zero results, until I realize that I forgot the quotes. Could Compass automatically convert numeric _id values to strings before running the query?
1
vote
Dan
shared this idea
-
Susnigdha commented
If its '_id' you're looking for, your query is wrong.
If the value of 'id' is a string, then it has to be enclosed in string as its a string field, otherwise unwanted results can crop up. But for those 'id' fields which have numeric data, and matches with 12345, Compass does return the documents.