escape field names in insert qury

This commit is contained in:
Yuri Kuznetsov
2014-03-31 15:50:39 +03:00
parent ab2021dc65
commit 5a3d2aedc5
+1 -1
View File
@@ -753,7 +753,7 @@ abstract class Mapper implements IMapper
$fieldArr[] = $this->toDb($field);
$valArr[] = $this->quote($value);
}
$fieldsPart = implode(", ", $fieldArr);
$fieldsPart = "`" . implode("`, `", $fieldArr) . "`";
$valuesPart = implode(", ", $valArr);
$sql = $this->composeInsertQuery($this->toDb($entity->getEntityName()), $fieldsPart, $valuesPart);