FieldPath

classFieldPath


AFieldPath refers to a field in a document. The path may consist of a single field name (referring to a top level field in the document), or a list of field names (referring to a nested field in the document).

Summary

Public functions

java-staticFieldPath

Returns A special sentinelFieldPath to refer to the ID of a document.

Boolean
equals(o: Any!)
Int
java-staticFieldPath
of(fieldNames: Array<String!>!)

Creates aFieldPath from the provided field names.

String!

Public functions

documentId

java-static fun documentId(): FieldPath

Returns A special sentinelFieldPath to refer to the ID of a document. It can be used in queries to sort or filter by the document ID.

equals

fun equals(o: Any!): Boolean

hashCode

fun hashCode(): Int

of

java-static fun of(fieldNames: Array<String!>!): FieldPath

Creates aFieldPath from the provided field names. If more than one field name is provided, the path will point to a nested field in a document.

Parameters
fieldNames: Array<String!>!

A list of field names.

Returns
FieldPath

AFieldPath that points to a field location in a document.

toString

fun toString(): String!

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.