File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 5
5
# v8.13.0
6
6
- [ added] Added support for explicit typing to ` DocumentReference.getDocument(as:) `
7
7
and ` DocumentSnapshot.data(as:) ` to simplify mapping documents (#9101 ).
8
+ - [ changed] ` DocumentSnapshot.data(as:) ` will decode the document to the type
9
+ provided. If you expect that a document might * not exist* , use an optional
10
+ type (e.g. ` Book?.self ` ) to account for this. See
11
+ [ the documentation] ( https://firebase.google.com/docs/firestore/query-data/get-data#custom_objects )
12
+ and this [ blog post] ( https://peterfriese.dev/posts/firestore-codable-the-comprehensive-guide/#mapping-simple-types-using-codable )
13
+ for an in-depth discussion.
8
14
9
15
# 8.12.1
10
16
- [ added] Added async wrapper for ` CollectionReference.addDocument() ` and
You can’t perform that action at this time.
0 commit comments