|
@@ -25,13 +25,13 @@ discard block |
|
|
block discarded – undo |
|
25
|
25
|
$this->crudBuilder = new \Maphper\Lib\CrudBuilder(); |
|
26
|
26
|
$this->selectBuilder = new \Maphper\Lib\SelectBuilder(); |
|
27
|
27
|
|
|
28
|
|
- $this->fields = implode(',', array_map([$this->adapter, 'quote'], (array) $this->options->read('fields'))); |
|
|
28
|
+ $this->fields = implode(',', array_map([$this->adapter, 'quote'], (array)$this->options->read('fields'))); |
|
29
|
29
|
|
|
30
|
|
- $this->defaultSort = $this->options->read('defaultSort') !== false ? $this->options->read('defaultSort') : implode(', ', $this->primaryKey); |
|
|
30
|
+ $this->defaultSort = $this->options->read('defaultSort') !== false ? $this->options->read('defaultSort') : implode(', ', $this->primaryKey); |
|
31
|
31
|
|
|
32
|
32
|
$this->alterDb = $this->options->getEditMode(); |
|
33
|
33
|
|
|
34
|
|
- if (self::EDIT_OPTIMISE & $this->alterDb && rand(0,500) == 1) $this->adapter->optimiseColumns($table); |
|
|
34
|
+ if (self::EDIT_OPTIMISE & $this->alterDb && rand(0, 500) == 1) $this->adapter->optimiseColumns($table); |
|
35
|
35
|
} |
|
36
|
36
|
|
|
37
|
37
|
public function getPrimaryKey() { |
|
@@ -161,7 +161,7 @@ discard block |
|
|
block discarded – undo |
|
161
|
161
|
//Something has changed, clear any cached results as they may now be incorrect |
|
162
|
162
|
$this->resultCache = []; |
|
163
|
163
|
$pkValue = $data->{$this->primaryKey[0]}; |
|
164
|
|
- if (isset($this->cache[$pkValue])) $this->cache[$pkValue] = (object) array_merge((array)$this->cache[$pkValue], (array)$data); |
|
|
164
|
+ if (isset($this->cache[$pkValue])) $this->cache[$pkValue] = (object)array_merge((array)$this->cache[$pkValue], (array)$data); |
|
165
|
165
|
else $this->cache[$pkValue] = $data; |
|
166
|
166
|
} |
|
167
|
167
|
|