| { |
| "tests": [ |
| { |
| "description": "update: Delete with a dotted field", |
| "comment": "After expanding top-level dotted fields, fields with Delete\nvalues are pruned from the output data, but appear in the update mask.", |
| "update": { |
| "docRefPath": "projects/projectID/databases/(default)/documents/C/d", |
| "jsonData": "{\"a\": 1, \"b.c\": \"Delete\", \"b.d\": 2}", |
| "request": { |
| "database": "projects/projectID/databases/(default)", |
| "writes": [ |
| { |
| "update": { |
| "name": "projects/projectID/databases/(default)/documents/C/d", |
| "fields": { |
| "a": { |
| "integerValue": "1" |
| }, |
| "b": { |
| "mapValue": { |
| "fields": { |
| "d": { |
| "integerValue": "2" |
| } |
| } |
| } |
| } |
| } |
| }, |
| "updateMask": { |
| "fieldPaths": [ |
| "a", |
| "b.c", |
| "b.d" |
| ] |
| }, |
| "currentDocument": { |
| "exists": true |
| } |
| } |
| ] |
| } |
| } |
| } |
| ] |
| } |