Hi all, very confused as I’m experiencing some strange behaviour. I’ll leave the code out and just explain the situation in order to keep it short. Essentially I’m developing an online restaurant menu system. A user can add, edit and delete dishes stored under their restaurant object. A dish object is essentially this
dish = {
name: …
description: …
category: …
optionsets: []
}
Rather than building any edit functionality for the time being, I have robomongo running which allows me to edit the mongo database. If I edit a dishes name, description or category, I will see the dish update in real-time in my browser.
However if I edit the options within the option set array, I do not see any changes in real-time. Even when I refresh the page, the changes still aren’t showing. I have cleared all browsing data as well. However the data in the database has 100% been updated. An option object inside the optionset array is simply the following
option: {name:…, priceModifier: 1} . If I change either the option name or modifier, neither of those changes are reflected in real time. Even referring the page isn’t reflecting the changes. However adding a new dish with options seems to render perfectly fine so as long as it’s new.
Is this some sort of default behavior in order to keep the application optimized so every little tiny change in an objects sub-fields isn’t recalling the entire mongo array again? If so there must be a way around this right?
If this isn’t the case, then I guess I must have done something wrong on my end somewhere.
Any help is appreciated