A materialized Document with an ID. Keys, Tokens and Documents in
user-defined Collections are modeled with a Document. All top level
Document fields are added to a Document instance, but types cannot be
provided. Cast the instance to a DocumentT to have typesafe access to
all top level fields.
The example below retrieves a document from a
hypothetical "Users" collection.
A materialized Document with an ID. Keys, Tokens and Documents in user-defined Collections are modeled with a Document. All top level Document fields are added to a Document instance, but types cannot be provided. Cast the instance to a DocumentT to have typesafe access to all top level fields.
The example below retrieves a document from a hypothetical "Users" collection.
Example
Remarks
The Document class cannot be generic because classes cannot extend generic type arguments.
See
https://docs.fauna.com/fauna/current/reference/fql_reference/types#special