by pjungwir · 9y ago · 0 comments
> The example is that if you have 10 rakes in the stores,
> you can only sell 10 rakes. The approach that is taken
> is quite nice, by simulating the notion of having a
> document per each of the rakes in the store and allowing
> users to place them in their cart.
In other words there are 10 documents in Mongo, not 1 document with a `"quantity": 10` attribute.And with current amounts of RAM on servers there would be no problems even if you have tens of millions of items.
You could have a list inside a single document.