blob: c408e93503e344a0ed92a39f3f2d8cce12eb3d34 [file] [log] [blame]
{
"tests": [
{
"description": "update-paths: multiple ServerTimestamp fields",
"comment": "A document can have more than one ServerTimestamp field.\nSince all the ServerTimestamp fields are removed, the only field in the update is \"a\".",
"updatePaths": {
"docRefPath": "projects/projectID/databases/(default)/documents/C/d",
"fieldPaths": [
{
"field": [
"a"
]
},
{
"field": [
"b"
]
},
{
"field": [
"c"
]
}
],
"jsonValues": [
"1",
"\"ServerTimestamp\"",
"{\"d\": \"ServerTimestamp\"}"
],
"request": {
"database": "projects/projectID/databases/(default)",
"writes": [
{
"update": {
"name": "projects/projectID/databases/(default)/documents/C/d",
"fields": {
"a": {
"integerValue": "1"
}
}
},
"updateMask": {
"fieldPaths": [
"a",
"c"
]
},
"updateTransforms": [
{
"fieldPath": "b",
"setToServerValue": "REQUEST_TIME"
},
{
"fieldPath": "c.d",
"setToServerValue": "REQUEST_TIME"
}
],
"currentDocument": {
"exists": true
}
}
]
}
}
}
]
}