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

Handling the way filters deal with empty lists #72

Merged
merged 3 commits into from Aug 18, 2013
Merged

Handling the way filters deal with empty lists #72

merged 3 commits into from Aug 18, 2013

Conversation

zefixlluja
Copy link

Filters assumed lists to always contain elements, the case
of empty lists was not handled correctly. Now we check for
empty lists in stored and expected values when applying the
filter.

Having this data:

{ "_id" : 1 , "title" : "The Hobbit" , "numberOfPages" : 293 , "characters" : [ ]}

A findOne(obj) would not find the document in Fongo, but does
find it in the real mongo.

Filters assumed lists to always contain elements, the case
of empty lists was not handled correctly. Now we check for
empty lists in stored and expected values when applying the
filter.
@zefixlluja
Copy link
Author

I would like to add another commit to this during the day - my problem lies in findOne comparison of lists

Jochen Munz added 2 commits August 8, 2013 11:35
The unit test for the FongoDbCollection better explains the actual problem.

The solution in ExpressionParser is now more general, but should be reviewed
whether it is maybe too general.
hoffrocket added a commit that referenced this pull request Aug 18, 2013
Handling the way filters deal with empty lists
@hoffrocket hoffrocket merged commit 3d31605 into foursquare:master Aug 18, 2013
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

Successfully merging this pull request may close these issues.

None yet

2 participants