blob: 23c06f4976f7cace823e12f257d56cc4f4b1e103 [file] [log] [blame]
{
"tests": [
{
"description": "set: 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\".",
"set": {
"docRefPath": "projects/projectID/databases/(default)/documents/C/d",
"jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": {\"d\": \"ServerTimestamp\"}}",
"request": {
"database": "projects/projectID/databases/(default)",
"writes": [
{
"update": {
"name": "projects/projectID/databases/(default)/documents/C/d",
"fields": {
"a": {
"integerValue": "1"
}
}
}
},
{
"transform": {
"document": "projects/projectID/databases/(default)/documents/C/d",
"fieldTransforms": [
{
"fieldPath": "b",
"setToServerValue": "REQUEST_TIME"
},
{
"fieldPath": "c.d",
"setToServerValue": "REQUEST_TIME"
}
]
}
}
]
}
}
}
]
}