Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0 in query converted into '\u001b[33m0\u001b[39m' #3689

Closed
spamguy opened this issue Dec 18, 2015 · 2 comments
Closed

0 in query converted into '\u001b[33m0\u001b[39m' #3689

spamguy opened this issue Dec 18, 2015 · 2 comments
Milestone

Comments

@spamguy
Copy link

spamguy commented Dec 18, 2015

I scripted a query in my Express app, games.find({ status: { '$in': [ 0, 2 ] } }). That is, find all games whose status is either 0 or 2.

When Mongoose executed this query, the result set was as expected. The debug output converted the 0 to misencoded garbage, though:

Mongoose: games.find({ status: { '$in': [ '\u001b[33m0\u001b[39m', 2 ] } }) { fields: undefined } 

I had been running 4.0.8, but this encouraged me to upgrade to 4.2.10. No change.

@vkarpov15
Copy link
Collaborator

What does your schema look like?

@vkarpov15 vkarpov15 added this to the 4.3.4 milestone Dec 18, 2015
@spamguy
Copy link
Author

spamguy commented Dec 19, 2015

See https://github.com/spamguy/diplomacy/blob/master/server/models/game.js .

Also worth noting: nothing changed when I tried changing the array to read ['0', '2'].

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

No branches or pull requests

2 participants