Skip to content

Commit

Permalink
Small optimization in DboSource
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Nov 4, 2011
1 parent 926ac32 commit b983aa9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/Cake/Model/Datasource/DboSource.php
Expand Up @@ -951,8 +951,6 @@ public function create(Model $model, $fields = null, $values = null) {


for ($i = 0; $i < $count; $i++) { for ($i = 0; $i < $count; $i++) {
$valueInsert[] = $this->value($values[$i], $model->getColumnType($fields[$i])); $valueInsert[] = $this->value($values[$i], $model->getColumnType($fields[$i]));
}
for ($i = 0; $i < $count; $i++) {
$fieldInsert[] = $this->name($fields[$i]); $fieldInsert[] = $this->name($fields[$i]);
if ($fields[$i] == $model->primaryKey) { if ($fields[$i] == $model->primaryKey) {
$id = $values[$i]; $id = $values[$i];
Expand Down

0 comments on commit b983aa9

Please sign in to comment.