🐛 [Firebase Firestore] BatchWrite.update does not implement type-safe read & write operations. #11552
Labels
platform: all
Issues / PRs which are for all platforms.
plugin: cloud_firestore
type: enhancement
New feature or request
type: missing-feature
A feature that is supported on the underlying Firebase SDK but has not been exposed to Dart API.
Bug report
WriteBatch.update
does not implementwithConverter
Type handling.This seems like a bug to me since
WriteBatch.set
does implementwithConverter
Type handling, and it appears that implementing the same in theupdate
method has been overlooked.Some may say this should be a Feature Request rather than a Bug Report. If that turns out to be the general consensus I'll change it.
Steps to reproduce
Steps to reproduce the behavior:
withConverter
ToFirestore & FromFirestore functions to provide type-safe read & write operations for a data class.BatchWrite.set
andBatchWrite.update
usingwithConverter
and supplying the relevant data Object.Result
BatchWrite.set
has no issues.BatchWrite.update
results in error "The argument type '[Object]' can't be assigned to the parameter type 'Map<String, dynamic>'."Expected behavior
Both
BatchWrite.set
andBatchWrite.update
usingwithConverter
should be allowed.Additional context
Current implementation for
BatchWrite.set
:Current implementation for
BatchWrite.update
:The text was updated successfully, but these errors were encountered: