Tag: MongoDB

MongoDB is one of the most popular database management systems.

  • MongoDB Mistake: Adding an element to an array on upsert

    An upsert operation updates an existing document or inserts a new one. But, using array update operators such as $addToSet or $push may lead to errors, when the query contains the corresponding field predicate and the insert-case is activated. I will show you the case that I encountered and how to fix it.