Replies: 1 comment
-
Timestamp is not a value that provided by user but operation/transaction timestamp. You have to know field path to set the timestamp value. FieldTransform::SetToServerValue setValue(FieldTransform::REQUEST_TIME);
FieldTransform::FieldTransform fieldTransforms(fieldPath, setValue); In case of array, we can't access the map or any field type inside the array i.e. no field path available for array. Then you can't set the server timestamp to the field inside the array. You have to provide your timestamp value in your map value manually instead of setting server timestamp. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry if this might seem lazy/obvious for some of you, but I've been struggling to get this to work.
Like AppendMapValueTimestamp.ino
Except I'd like to append maps (which contain a timestamp field) to an array, and not have a map of maps
i.e.
[ { timestamp: May 9 } ]
Instead of
{ key1: { timestamp: May 9 } }
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions