You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is related to the #20 , because the same problem that arrives when trying to delete the data, also happens when you try to update the firebase data from more than one place at once, because of the use of the .set method instead of the .update.
For example, let's say we have a site with a cart, and the user is updating the cart at the site (changing product quantities) and we wan't to keep the shipment updated. If we try to update only the shipment field of the cart, it will also override the product's (that the user might have already updated) since it will fetch the data from the database, merge it with the new shipment value and then .set() it.
My doubt is, there are any reason why the .set are used instead of the .update method from firebase? Doing the .update and not trying to merge the data would fix both this and the #20 issue.
The text was updated successfully, but these errors were encountered:
This is related to the #20 , because the same problem that arrives when trying to delete the data, also happens when you try to update the firebase data from more than one place at once, because of the use of the .set method instead of the .update.
For example, let's say we have a site with a cart, and the user is updating the cart at the site (changing product quantities) and we wan't to keep the shipment updated. If we try to update only the shipment field of the cart, it will also override the product's (that the user might have already updated) since it will fetch the data from the database, merge it with the new shipment value and then .set() it.
My doubt is, there are any reason why the .set are used instead of the .update method from firebase? Doing the .update and not trying to merge the data would fix both this and the #20 issue.
The text was updated successfully, but these errors were encountered: