<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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