blob: c70ec691e29a3f98fb020457e89c76e49e620bc9 [file] [log] [blame]
{
"tests": [
{
"description": "set: MergeAll with nested fields",
"comment": "MergeAll with nested fields results in an update mask that\nincludes entries for all the leaf fields.",
"set": {
"docRefPath": "projects/projectID/databases/(default)/documents/C/d",
"option": {
"all": true
},
"jsonData": "{\"h\": { \"g\": 3, \"f\": 4 }}",
"request": {
"database": "projects/projectID/databases/(default)",
"writes": [
{
"update": {
"name": "projects/projectID/databases/(default)/documents/C/d",
"fields": {
"h": {
"mapValue": {
"fields": {
"f": {
"integerValue": "4"
},
"g": {
"integerValue": "3"
}
}
}
}
}
},
"updateMask": {
"fieldPaths": [
"h.f",
"h.g"
]
}
}
]
}
}
}
]
}