-
Notifications
You must be signed in to change notification settings - Fork 333
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
Aggregation framework $project does not work on fields within nested documents #397
Labels
enhancement
Reporting a feature that is missing from mongomock.
Comments
I have the same problem when using aggregate |
pcorpet
changed the title
Aggregation framework $projection does not work on fields within nested documents
Aggregation framework $projec does not work on fields within nested documents
Aug 11, 2018
pcorpet
changed the title
Aggregation framework $projec does not work on fields within nested documents
Aggregation framework $project does not work on fields within nested documents
Aug 11, 2018
I think you are both writing about the same feature: subfields in $project. It is indeed unsupported yet, however the error should be clearer about it. I've worked on a first fix to give the right exception, and might follow up with the actual solution. |
pcorpet
added a commit
to pcorpet/mongomock
that referenced
this issue
Aug 12, 2018
pcorpet
added a commit
that referenced
this issue
Aug 12, 2018
Mark the subfield projection feature as not implemented yet. For #397.
pcorpet
added
the
enhancement
Reporting a feature that is missing from mongomock.
label
Aug 22, 2018
pcorpet
added a commit
to pcorpet/mongomock
that referenced
this issue
Nov 28, 2018
pcorpet
added a commit
to pcorpet/mongomock
that referenced
this issue
Nov 29, 2018
pcorpet
added a commit
to pcorpet/mongomock
that referenced
this issue
Dec 4, 2018
pcorpet
added a commit
that referenced
this issue
Dec 4, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using {'$projection' : {'doc_field.subfield': 1}} in an aggregation pipeline, this doesn't work:
File ".../lib/python2.7/site-packages/mongomock/collection.py", line 1627, in aggregate
out_collection = _extend_collection(out_collection, field, value)
File ".../lib/python2.7/site-packages/mongomock/collection.py", line 1506, in _extend_collection
doc[field] = _parse_expression(expression.copy(), doc)
AttributeError: 'int' object has no attribute 'copy'
The text was updated successfully, but these errors were encountered: