Mongo - Update nested array element


Problem:

Update a nested element inside an array, lets say, the product "availability".
 
Example structure


Solution: 

The "non-trivial" part of this solution is the need for the "$" operator:


Comments

Popular posts from this blog

Hibernate - HibernateException: createQuery is not valid without active transaction