[firebase_data_connect]: Null Values stored as Empty Strings in DB #17357
Labels
Needs Attention
This issue needs maintainer attention.
platform: android
Issues / PRs which are specifically for Android.
platform: ios
Issues / PRs which are specifically for iOS.
platform: macos
Issues / PRs which are specifically for MacOS.
plugin: data_connect
type: bug
Something isn't working
Is there an existing issue for this?
Which plugins are affected?
Database, Other
Which platforms are affected?
Android, iOS, macOS
Description
When I tried to store a null float value or string value to the database, the null value is being converted to an empty string and stored to the database.
This should not be the case as null values are meant to be stored.
Calling the above will not save the data as the error below will be shown
Error copied from the dataconnect-debug.log
Variables:
{
"docRef": "",
"id": "0420705a-60c0-46c2-8d41-0047e048ca3f",
"name": "White Rice",
"sortId": "",
}
Errors: input: $sortId is invalid Float: unexpected value: with type: string
Taking out sortId from the table and queries stores the data but docRef is an empty string instead of null in the database.
Reproducing the issue
Create the table in the description.
Try adding data.
On VsCode, query the data with SQLTools
Notice that docRef column has empty string instead of null
Firebase Core version
3.9.0
Flutter Version
3.29.2
Relevant Log Output
Flutter dependencies
Expand
Flutter dependencies
snippetAdditional context and comments
No response
The text was updated successfully, but these errors were encountered: