|
@@ 2178-2181 (lines=4) @@
|
| 2175 |
|
} |
| 2176 |
|
|
| 2177 |
|
// Do we have a field that needs to be lazy loaded? |
| 2178 |
|
if (isset($this->record[$field.'_Lazy'])) { |
| 2179 |
|
$tableClass = $this->record[$field.'_Lazy']; |
| 2180 |
|
$this->loadLazyFields($tableClass); |
| 2181 |
|
} |
| 2182 |
|
|
| 2183 |
|
// In case of complex fields, return the DBField object |
| 2184 |
|
if (static::getSchema()->compositeField(static::class, $field)) { |
|
@@ 2379-2382 (lines=4) @@
|
| 2376 |
|
} |
| 2377 |
|
|
| 2378 |
|
// If we've just lazy-loaded the column, then we need to populate the $original array |
| 2379 |
|
if (isset($this->record[$fieldName.'_Lazy'])) { |
| 2380 |
|
$tableClass = $this->record[$fieldName.'_Lazy']; |
| 2381 |
|
$this->loadLazyFields($tableClass); |
| 2382 |
|
} |
| 2383 |
|
|
| 2384 |
|
// Situation 1: Passing an DBField |
| 2385 |
|
if ($val instanceof DBField) { |
|
@@ 2666-2669 (lines=4) @@
|
| 2663 |
|
return null; |
| 2664 |
|
} |
| 2665 |
|
|
| 2666 |
|
if (!isset($this->record[$fieldName]) && isset($this->record[$fieldName . '_Lazy'])) { |
| 2667 |
|
$tableClass = $this->record[$fieldName . '_Lazy']; |
| 2668 |
|
$this->loadLazyFields($tableClass); |
| 2669 |
|
} |
| 2670 |
|
|
| 2671 |
|
$value = isset($this->record[$fieldName]) |
| 2672 |
|
? $this->record[$fieldName] |