| @@ 285-298 (lines=14) @@ | ||
| 282 | * @param string|null $toScenario |
|
| 283 | * @return BaseModel|null |
|
| 284 | */ |
|
| 285 | public function freshFindById(int $id, string $toScenario = null) |
|
| 286 | { |
|
| 287 | ||
| 288 | // Find record in db |
|
| 289 | if ($record = $this->findRecordById($id)) { |
|
| 290 | ||
| 291 | // Create |
|
| 292 | return $this->createFromRecord($record, $toScenario); |
|
| 293 | ||
| 294 | } |
|
| 295 | ||
| 296 | return null; |
|
| 297 | ||
| 298 | } |
|
| 299 | ||
| 300 | /** |
|
| 301 | * @param int $id |
|
| @@ 282-295 (lines=14) @@ | ||
| 279 | * @param string|null $toScenario |
|
| 280 | * @return BaseObject|null |
|
| 281 | */ |
|
| 282 | public function freshFindById(int $id, string $toScenario = null) |
|
| 283 | { |
|
| 284 | ||
| 285 | // Find record in db |
|
| 286 | if ($record = $this->findRecordById($id)) { |
|
| 287 | ||
| 288 | // Create |
|
| 289 | return $this->createFromRecord($record, $toScenario); |
|
| 290 | ||
| 291 | } |
|
| 292 | ||
| 293 | return null; |
|
| 294 | ||
| 295 | } |
|
| 296 | ||
| 297 | /** |
|
| 298 | * @param int $id |
|