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

Unsupported $$ROOT aggregation expression #31

Closed
bsautel opened this issue Nov 8, 2018 · 2 comments
Closed

Unsupported $$ROOT aggregation expression #31

bsautel opened this issue Nov 8, 2018 · 2 comments

Comments

@bsautel
Copy link
Contributor

bsautel commented Nov 8, 2018

As suggested here, I gave a try to mongo-java-server to replace fongo which seems to be no longer maintained and does not work with the 3.8 MongoDB Java driver.

First, I would like to thank you @bwaldvogel and all the other contributors for working on this project. Using the wire protocol seems to be a more reliable method as mocking the Java MongoDB driver as Fongo does since each implementation change in the driver can break the tool.

I ran all my tests using mongo-java-server and I noticed two blocking issues. I will report the other one in another ticket.

In an aggregation pipeline, I use the grouping operator and the $$ROOT expression that references the whole object, unlike ${field} which references a field of the object. It is documented here.

I get no error telling that it is unsupported but the field which should contain the result of this expression is null.

I tried to use the ${field} syntax and it seems to be supported. It would probably be necessary to extend this syntax to support the $$ROOT expression and maybe the other $$ specific expressions detailed in the documentation.

@bwaldvogel
Copy link
Owner

Thanks for reporting this issue!
It should be fixed in version 1.9.6.

@bsautel
Copy link
Contributor Author

bsautel commented Nov 9, 2018

It works with the 1.9.6 version.

Thanks for your reactivity! You fixed the three issues I reported so fast!

Thanks to the 1.9.6 release, I could finish the Spring Boot 2.1.0 migration of my application! That's awesome! Congratulations!

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

2 participants