-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Has your issue been reported?
- I have searched the existing issues and confirm it has not been reported.
- I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.
Current Behavior
In the app workflow: The "User" collection contains a MAP field called "my_vehicles," which is a list of data type "vehicle_ownership." Within this MAP list, there is a requirement to update specific fields of individual "vehicle_ownership" entries.
On the page VehicleDetails, I'm implementing a feature to update the vehicle's mileage in both the "vehicle" and "users" collections. In the "vehicle" collection, which has one document per vehicle, the data is updating as expected. However, in the "users" collection, where the necessary fields to update are within the MAP list, the data isn't updating, even though the action "Backend Call Update Document" is set to update a specific vehicle index.
Expected Behavior
The expected behavior is that when updating the vehicle mileage on the VehicleDetails page, the changes should be reflected in both the "vehicle" collection (where each vehicle has one document) and the "users" collection (where the vehicle data is stored as a MAP list within the "my_vehicles" field).
Steps to Reproduce
To reproduce the issue and test the application, it is essential to either run the application using my database or have a copy of the data in the "auto-maker-images" and "vehicle-images" collections to ensure that the steps provided accurately reflect the behavior related to updating fields within the MAP list of the "my_vehicles" field in the "users" collection.
-
Run the project in test mode.
-
Create a new user and complete the profile and vehicle information during registration.
-
After finishing the registration, you will be redirected to the home page, where you can view your registered vehicle displayed as part of a car card in a page view component.
-
Click on "Detalhes" in the upper right corner of the car card to be redirected to the Vehicle Details page.
-
Update the mileage of the vehicle on the Vehicle Details page.
-
Check the Firestore collections "vehicle" and "user" to confirm that the mileage information is not updating within the MAP list of "my_vehicles" in the "users" collection.
Reproducible from Blank
- The steps to reproduce above start from a blank project.
Bug Report Code (Required)
IT4wk+fluJN1xMtF1ar2b+9ViicWMjp7ba8vk8JueCs9f5CvOpYUec/6P1hvQt+6SlVUMWGMp14B/9LTv+zlKcABITGrRqZRzs9uYA3yc3KWbp+TF7qCQnN5EdJnJ26k4KTUiBNQAPNeW1Ya2zmMB+yWThfXJIP4PHo8Sq/LZO4=
Context
The use of the MAP structure in the "my_vehicles" field is a crucial part of our architectural plan to optimize database reads and reduce unnecessary Firestore document reads. By storing vehicle data as a MAP within the "my_vehicles" field in the "users" collection, we can retrieve all relevant information for a user's vehicles with a single document read, rather than requiring separate reads for each vehicle in a separate collection.
However, the current issue prevents us from effectively updating the vehicle data within the MAP list, leading to potential discrepancies between the "vehicle" and "users" collections. This not only impacts the accuracy of user data but also hinders our efforts to optimize database usage and reduce Firestore costs.
Given that Firestore charges per document reads, it's crucial for us to efficiently manage data retrieval and updates. The ability to update vehicle details directly within the MAP list is vital for maintaining data accuracy and optimizing database performance.
Resolving this issue promptly is of utmost importance to ensure the app's compliance with our architectural plan and to provide users with a seamless and cost-effective experience. We appreciate your attention to this matter and look forward to a resolution that allows us to effectively manage vehicle data while adhering to our architectural principles.
Visual documentation
-
Run the project in test mode.
-
Create a new user and complete the profile and vehicle information during registration.




-
After finishing the registration, you will be redirected to the home page, where you can view your registered vehicle displayed as part of a car card in a page view component.
-
Click on "Detalhes" in the upper right corner of the car card to be redirected to the Vehicle Details page.

-
Update the mileage of the vehicle on the Vehicle Details page.

-
Check the Firestore collections "vehicle" and "user" to confirm that the mileage information is not updating within the MAP list of "my_vehicles" in the "users" collection.
Additional Info
To reproduce the issue and test the application, it is essential to either run the application using my database or have a copy of the data in the "auto-maker-images" and "vehicle-images" collections to ensure that the steps provided accurately reflect the behavior related to updating fields within the MAP list of the "my_vehicles" field in the "users" collection.
Environment
- FlutterFlow version: v3.1
- Platform: Windows Web and Desktop
- Browser name and version: Microsoft Edge Version 115.0.1901.188
- Operating system and version affected: Windows 11 Pro Version 10.0.22621
