@@ -46,6 +46,22 @@ import { AbstractUserDataWriter } from './user_data_writer';
46
46
* Using the converter allows you to specify generic type arguments when
47
47
* storing and retrieving objects from Firestore.
48
48
*
49
+ * In this context, an "AppModel" is a class that is used in an application to
50
+ * package together related information and functionality. Such a class could,
51
+ * for example, have properties with complex, nested data types, properties used
52
+ * for memoization, properties of types not supported by Firestore (such as
53
+ * `symbol` and `bigint`), and helper functions that perform compound
54
+ * operations. Such classes are not suitable or possible to store into a
55
+ * Firestore database. Instead, instances of such classes need to be converted
56
+ * to "plain old JavaScript objects" (POJOs), objects with only primitive
57
+ * properties, potentially nested inside other objects or arrays. In this
58
+ * context, this type is referred to as the "DbModel" and would be an object
59
+ * suitable for persisting into Firestore. For convenience, applications can
60
+ * implement `FirestoreDataConverter` and register the converter with Firestore
61
+ * objects, such a `DocumentReference` or `Query`, to automatically convert
62
+ * `AppModel` to `DbModel` when storing into Firestore, and convert `DbModel`
63
+ * back to `AppModel` when retrieving from Firestore.
64
+ *
49
65
* @example
50
66
*
51
67
* Simple Example
0 commit comments