-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Currently, the Firestore SDK provides the following interfaces for set(/update(/etc, w.r.t. write batches and writing in general (parameters irrelevant to this ticket omitted):
- Add via Java:
set(..., Map<String, Object> fields, ...) - Add via POJO:
set(..., Object pojo, ...)
These are great for a lot of use cases. But, those underlying methods immediately serialize everything to com.google.firestore.v1beta1.Value objects.
If your application would like more control over the Value(s) selected during serialization, why can't you provide your object via set(..., Map<String, com.google.firestore.v1beta1.Value>)?
I'd like to request that such an interface be added. Or, another way to do it would be to accept Protobuf's regular Value well-known-type. However, it seems as though it reflects a subset of Firestore's types (i.e. setNumberValue where Firestore has setDoubleValue, setIntegerValue, etc) so I understand why that particular type wrapper was not used.
Thank you in advance