-
Notifications
You must be signed in to change notification settings - Fork 1k
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
$exists array [] (quantum mechanics of data base) #581
Comments
Perhaps some where in the library the fact of property $exists check like if(property) or etc. |
@impfromliga Can you confirm that your data set also contained 111 records with an empty array value ( I added some quick checks to various array values in the tests to try to reproduce this. It appears that an empty array fails to match on both model.match({ a: [5, 6] }, { a: { $exists: true } }).should.equal(true);
model.match({ a: [5] }, { a: { $exists: true } }).should.equal(true);
model.match({ a: [5] }, { b: { $exists: false } }).should.equal(true);
model.match({ a: [0] }, { a: { $exists: true } }).should.equal(true);
model.match({ a: [null] }, { a: { $exists: true } }).should.equal(true);
model.match({ a: [] }, { a: { $exists: false } }).should.equal(false);
model.match({ a: [] }, { a: { $exists: true } }).should.equal(true); // UNEXPECTED FAIL |
//strange result with $exists on Arrays:
The text was updated successfully, but these errors were encountered: