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

Mongo filter support #149

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Mongo filter support #149

wants to merge 2 commits into from

Conversation

rclai
Copy link

@rclai rclai commented Jan 23, 2015

This is in regards to #148.

@aslagle
Copy link
Owner

aslagle commented Jan 23, 2015

I'm about to merge a branch with server-side filtering, and I had to have a separate mongo selector argument on the server side, so I guess this would make the client options more consistent. (Otherwise, you can just pass in collection.find(filter) as the collection.)

There'd be some merge conflicts - I moved the filter code and I've been calling the separate argument selector.

@frabrunelle
Copy link

👍 for having a mongo selector argument on the client side. currently I am getting some warnings with astronomy when I specify collection.find(filter) instead of collection. It's not causing any bugs but I don't like having warnings in my console.

Trying to set a value of the "_modifiers" field that does not exist in the "Member" class
Trying to set a value of the "_original" field that does not exist in the "Member" class
Trying to set a value of the "_errors" field that does not exist in the "Member" class
Trying to set a value of the "_isNew" field that does not exist in the "Member" class

So I'm thinking that by having a separate argument for specifying the mongo selector, it will fix my issue, which I believe is due to this part of the code.

The other solution would be to add this code there:

// copy over fields from astronomy package
collection._modifiers = cursor._modifiers;
collection._original = cursor.collection._original;
collection._errors = cursor.collection._errors;
collection._isNew = cursor.collection._isNew;

Let me know which solution you prefer. Cheers.

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.

4 participants