Mongodb saving middleware for Magrathea