blob: 4193b00ea683367214241ce17248c3e0957554a3 [file] [log] [blame]
{
"tests": [
{
"description": "set-merge: non-leaf merge field with ServerTimestamp alone",
"comment": "If a field path is in a merge option, the value at that path\nreplaces the stored value. If the value has only ServerTimestamps, they become transforms\nand we clear the value by including the field path in the update mask.",
"set": {
"docRefPath": "projects/projectID/databases/(default)/documents/C/d",
"option": {
"fields": [
{
"field": [
"h"
]
}
]
},
"jsonData": "{\"h\": {\"g\": \"ServerTimestamp\"}, \"e\": 7}",
"request": {
"database": "projects/projectID/databases/(default)",
"writes": [
{
"update": {
"name": "projects/projectID/databases/(default)/documents/C/d"
},
"updateMask": {
"fieldPaths": [
"h"
]
}
},
{
"transform": {
"document": "projects/projectID/databases/(default)/documents/C/d",
"fieldTransforms": [
{
"fieldPath": "h.g",
"setToServerValue": "REQUEST_TIME"
}
]
}
}
]
}
}
}
]
}