Skip to content

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

@icoloma

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.

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