Skip to content

Conversation

@etchao
Copy link

@etchao etchao commented Jan 17, 2023

Currently, querying documents by a reference field (e.g. .where("reference_field", "==", reference)) results in incorrect results due to document references not being compared properly. Even if there are documents with references that have the same path as the document reference passed into the query, no documents get returned.

To address this, I've implemented __eq__ and __hash__ to be more similar to the actual BaseDocumentReference implementations (see here and here). _client is included in the original implementation, but is not present in mocked base document. Therefore, I've opted to only hash / compare _path.

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.

1 participant