blob: 2d813801ac3360a2cfecc6291895b72359c0e295 [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"
]
},
"currentDocument": {
"exists": true
}
},
{
"transform": {
"document": "projects/projectID/databases/(default)/documents/C/d",
"fieldTransforms": [
{
"fieldPath": "b",
"setToServerValue": "REQUEST_TIME"
},
{
"fieldPath": "c.d",
"setToServerValue": "REQUEST_TIME"
}
]
}
}
]
}
}
}
]
}