Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

fix: Remove DocumentReference from cursor#1882

Merged
milaGGL merged 4 commits intomainfrom
mila/fix-DocumentReference-in-cursor
Oct 3, 2023
Merged

fix: Remove DocumentReference from cursor#1882
milaGGL merged 4 commits intomainfrom
mila/fix-DocumentReference-in-cursor

Conversation

@milaGGL
Copy link
Copy Markdown
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
Copy Markdown

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 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
@milaGGL milaGGL deleted the mila/fix-DocumentReference-in-cursor branch October 3, 2023 19:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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