Skip to content

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