Fixes
This commit is contained in:
@ -78,7 +78,7 @@ abstract class Model implements ModelInterface
|
||||
if ($method->getName() === 'getRepository') {
|
||||
continue;
|
||||
}
|
||||
$p = strtolower(str_replace('get', '', $method->getName()));
|
||||
$p = strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', str_replace('get', '', $method->getName())));
|
||||
if (!isset($this->{$p})) {
|
||||
continue;
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ abstract class Repository implements RepositoryInterface
|
||||
$values = $this->mapArray($model, []);
|
||||
$cols = array_fill(0, count($values), '?');
|
||||
$query = $this->getQueryBuilder()->insert($this->getTable())->columns($this->getColumns())->values($cols);
|
||||
$this->getConnection()->execute($query, $values);
|
||||
$this->getConnection()->execute($query, array_values($values));
|
||||
}
|
||||
public function update(Model $model): void
|
||||
{
|
||||
|
Reference in New Issue
Block a user