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

Support $projection for nested fillds #137

Open
Gaff opened this issue Apr 28, 2020 · 1 comment
Open

Support $projection for nested fillds #137

Gaff opened this issue Apr 28, 2020 · 1 comment

Comments

@Gaff
Copy link
Contributor

Gaff commented Apr 28, 2020

As #121 - but for projection inside a regular mongo find() operation.

My test code is like so:

  MongoCollection<Document> _col = ...
  FindIterable<Document> result = _col.find().project(fields(exclude("a.b", "c));

Which comes through to de.bwaldvogel.mongo.backend.projection.Projection.projectDocument()

Should work for both of these forms:

{ "a" : {"b": 1, "xxx" : 0}}

{ "a" : [{"b": 1, "xxx" : 0}]}

Thanks!!

@bwaldvogel
Copy link
Owner

It’s partially fixed in version 1.29.0 but more work is needed to improve projection of arrays.

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