code: def save(self):
          
          d = dict(self)
          old_dict = d.copy()
          _id = self.collection.save(d)
          self._id = _id
          self.on_save(old_dict)
          return self._id
docs: Save model object to database.