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

Add support for FieldMask to DocumentReference.get() #227

Description

@icoloma

I can filter fields when running a Query, but not when getting a DocumentSnapshot by primary key. The code available in FirestoreImpl, but that's a private class.

What I would like to do:

DocumentReference ref = firestore.collection("collectionName").document("documentId");
ref.get(FieldMask.of("field1", "field2")); // <== this 

The implementation seems simple, as DocumentReference just forwards the call to firestore.getAll(), which does support FieldMask.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: firestoreIssues related to the googleapis/java-firestore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions