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

fix: Remove DocumentReference from cursor #1882

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

milaGGL
Copy link
Contributor

@milaGGL milaGGL commented Aug 15, 2023

Cursors accepts DocumentSnapshot or field values. https://googleapis.dev/nodejs/firestore/latest/CollectionReference.html#startAt

When field values are passed in to a cursor, it must followed by orderBy clauses of a 1:1 mapping relationship. But, if DocumentSnapshot is used, orderBy clauses are implicitly added by SDK on behalf of the client.

This PR fixes the problem that DocumentReference is given the same special treatment that DocumentSnapshot is receiving, but it does not provide field values like DocumentSnapshot does, which leads to query failure/ incorrect result.

@conventional-commit-lint-gcf
Copy link

conventional-commit-lint-gcf bot commented Aug 15, 2023

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: firestore Issues related to the googleapis/nodejs-firestore API. labels Aug 15, 2023
@milaGGL milaGGL marked this pull request as ready for review October 2, 2023 17:31
@milaGGL milaGGL requested review from a team as code owners October 2, 2023 17:31
@milaGGL milaGGL added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed kokoro:run Add this label to force Kokoro to re-run the tests. labels Oct 2, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 2, 2023
@milaGGL milaGGL merged commit da4f8f8 into main Oct 3, 2023
18 checks passed
@milaGGL milaGGL deleted the mila/fix-DocumentReference-in-cursor branch October 3, 2023 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants