|
22 | 22 | /**
|
23 | 23 | * Annotation used to mark a POJO property to be automatically populated with the document's ID when
|
24 | 24 | * the POJO is created from a Cloud Firestore document (for example, via {@link
|
25 |
| - * DocumentSnapshot#toObject}). |
| 25 | + * DocumentSnapshot#toObject(Class)}). |
26 | 26 | *
|
27 | 27 | * <ul>
|
28 | 28 | * Any of the following will throw a runtime exception:
|
|
33 | 33 | * <li>This annotation is applied to a property with a name that conflicts with a read document
|
34 | 34 | * field. For example, if a POJO has a field `firstName` annotated by {@code @DocumentId}, and
|
35 | 35 | * there is a property from the document named `firstName` as well, an exception is thrown
|
36 |
| - * when you try to read the document into the POJO via {@link DocumentSnapshot#toObject} or |
37 |
| - * {@link DocumentReference#get}. |
| 36 | + * when you try to read the document into the POJO via {@link |
| 37 | + * DocumentSnapshot#toObject(Class)} or {@link DocumentReference#get()}. |
38 | 38 | * <li>
|
39 | 39 | * </ul>
|
40 | 40 | *
|
41 |
| - * <p>When using a POJO to write to a document (via {@link DocumentReference#set} or @{@link |
42 |
| - * WriteBatch#set}), the property annotated by {@code @DocumentId} is ignored, which allows writing |
43 |
| - * the POJO back to any document, even if it's not the origin of the POJO. |
| 41 | + * <p>When using a POJO to write to a document (via {@link DocumentReference#set(Object)} or @{@link |
| 42 | + * WriteBatch#set(DocumentReference, Object)}), the property annotated by {@code @DocumentId} is |
| 43 | + * ignored, which allows writing the POJO back to any document, even if it's not the origin of the |
| 44 | + * POJO. |
44 | 45 | */
|
45 | 46 | @Retention(RetentionPolicy.RUNTIME)
|
46 | 47 | @Target({ElementType.FIELD, ElementType.METHOD})
|
|
0 commit comments