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

Fixes querying nested fields in dynamic embedded docs #2647

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

m-revetria
Copy link

Changing field lookup for DynamicDocuments when the field is nested in a DynamicEmbeddedDocument.

Before these changes, the code was creating a dynamic field when the container document is a dynamic document regardless of the field being nested in an embedded document. In which case the field should be looked up there.

This PR fixes #2251.

There are two new tests that evidence this and another error:

  1. test_complex_embedded_document_query: before the change this test raises a LookUpError (the error in Querying dynamic field on DynamicEmbeddedDocument throws LookUpError #2251)
  2. test_complex_embedded_document_with_aliased_field_query: this test shows up the query executed is not correct when a field in the DynamicEmbeddedDocument has defined a value for db_field.

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.

Querying dynamic field on DynamicEmbeddedDocument throws LookUpError
1 participant