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

Bug: $and doesn"t work with date for Model.find #1180

Closed
anotheri opened this issue Oct 31, 2012 · 2 comments
Closed

Bug: $and doesn"t work with date for Model.find #1180

anotheri opened this issue Oct 31, 2012 · 2 comments

Comments

@anotheri
Copy link
Contributor

$and operator doesn"t work with date datatype.

This condition for Model.find doesn"t work (just returns empty array):

{
    "$and": [{
        "gender": "female"
    }, {
        "birthday": "1987-03-17T20:00:00.000Z"
    }]
}

But this way is working:

{
    "gender": "female",
    "birthday": "1987-03-17T20:00:00.000Z"
}
@vedmalex
Copy link
Contributor

findout the bug: The query cast didn"t process the $and operation ---
mongoose/lib/query.js line 241
if ("$or" === path || "$nor" === path || "$and" === path) {

aheckmann pushed a commit that referenced this issue Nov 2, 2012
@aheckmann
Copy link
Collaborator

fixed in #1181

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

3 participants