blob: d115e12c2abd0b23e202264e590784e70309ba5e [file] [log] [blame]
{
"tests": [
{
"description": "set-merge: Merge field is not a leaf",
"comment": "If a field path is in a merge option, the value at that path\nreplaces the stored value. That is true even if the value is complex.",
"set": {
"docRefPath": "projects/projectID/databases/(default)/documents/C/d",
"option": {
"fields": [
{
"field": [
"h"
]
}
]
},
"jsonData": "{\"h\": {\"f\": 5, \"g\": 6}, \"e\": 7}",
"request": {
"database": "projects/projectID/databases/(default)",
"writes": [
{
"update": {
"name": "projects/projectID/databases/(default)/documents/C/d",
"fields": {
"h": {
"mapValue": {
"fields": {
"f": {
"integerValue": "5"
},
"g": {
"integerValue": "6"
}
}
}
}
}
},
"updateMask": {
"fieldPaths": [
"h"
]
}
}
]
}
}
}
]
}