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

Different behavior of mongo motor on find method with aggregation #873

Open
mamazinho opened this issue Jan 24, 2024 · 0 comments
Open

Different behavior of mongo motor on find method with aggregation #873

mamazinho opened this issue Jan 24, 2024 · 0 comments

Comments

@mamazinho
Copy link

On mongo motor when you make a query using find() method e after makes an aggregate, the aggregate will be applied above the filtered query and not above all collection.

But when using the mongomock on tests, this is not what happens, the aggregation is above all collection independent of what find() method returns. This behavior can be viewed on prints below:

  • Given this route, with this filter and aggregation:

IMG_20240124_012748_088.jpg

  • When I hit it with mongo motor it returns me filtered by machine_id "6748" given on line 190

IMG_20240124_012748_364.jpg

  • When I run the tests, it's possible see on "RESULTS" print on terminal, that all machines existents would be returned while no one should be returned

IMG_20240124_012748_584.jpg

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

1 participant