Closed AusIV closed 8 years ago
I'm pretty sure that deepCopy should never return a Document. If we have to deep copy it, it means that we can no longer update it.
I think the problem is more that when we merge a Document, we should merge its values and not the two fields doc
/table
.
In queries that include nested documents, deepcopy wasn't capturing that the nested documents were documents, which is sometimes tested using isinstance. This ensures that the type is retained through deep copies.
This adds two tests, as well. "without - 38" failed prior to this patch. "without - 39" succeeded, but was included to test that the order of the merge() and without() methods was signficant in triggering the deepcopy issue.