Skip to content

.find() Doesn't Pass Arguments #7

Closed
shane-walker opened this Issue Oct 5, 2012 · 3 comments

2 participants

@shane-walker

When you run a .find() and pass arguments they are not used in the resulting query.

Example:
server.db(db).getCollection('orders').find({ "status" : "complete" }).toArray();

Will return results with any 'status'.

Example:
server.db(db).getCollection('orders').find({}, {"order_id":1, "status":1}).toArray();

Will return the entire result row instead of just the fields enabled.

@olegp
Owner
olegp commented Feb 7, 2013

@shane-walker works for me, what was the root cause for you?

@shane-walker

The only thing I've been able to come up with is that I somehow got a really old version of the code. It looks like you fixed it back with commit 33786fd.

@olegp
Owner
olegp commented Feb 8, 2013

OK, thanks. Thought I had missed something for a moment there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.