More Update Operators: $inc, $push, $pull and $addToSet

$inc lets the database do the counting so no count is lost, $currentDate stamps when a change happened, $push and $pull add to and remove from a list, and $addToSet adds an item only when it isn't there yet.

By

Updated

Cheat sheet: More Update Operators: $inc, $push, $pull and $addToSet
Category
MongoDB
Level
Apprentice
Tags
$addToSet, $inc, $push and $pull, Array Field, Lost Update, mongodb