|
@@ -162,7 +162,7 @@ discard block |
|
|
block discarded – undo |
|
162
|
162
|
$instance = $item->getEntity(); |
|
163
|
163
|
BinderObject::bindObject($row->toArray(), $instance); |
|
164
|
164
|
|
|
165
|
|
- foreach ((array)$item->getFieldMap() as $property => $fieldName) { |
|
|
165
|
+ foreach ((array) $item->getFieldMap() as $property => $fieldName) { |
|
166
|
166
|
$instance->$property = $row->get($fieldName); |
|
167
|
167
|
} |
|
168
|
168
|
$collection[] = $instance; |
|
@@ -186,7 +186,7 @@ discard block |
|
|
block discarded – undo |
|
186
|
186
|
$query->table($this->mapper->getTable()) |
|
187
|
187
|
->fields(array_keys($array)); |
|
188
|
188
|
|
|
189
|
|
- if (empty($array[$this->mapper->getPrimaryKey()]) || count($this->get($array[$this->mapper->getPrimaryKey()])) === 0) { |
|
|
189
|
+ if (empty($array[$this->mapper->getPrimaryKey()]) || count($this->get($array[$this->mapper->getPrimaryKey()])) === 0) { |
|
190
|
190
|
$array[$this->mapper->getPrimaryKey()] = $this->insert($query, $array); |
|
191
|
191
|
BinderObject::bindObject($array, $instance); |
|
192
|
192
|
} else { |
Please login to merge, or discard this patch.