public function load($model, $id) { $this->tryLoadBy($model, $model->id_field, new MongoID($id)); if (!$model->loaded()) { throw $this->exception('Record not found')->addMoreInfo('id', $id); } }