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