$query->
execute();
} /**
* @param string $table
* @param array $data
* @param int|string $foreignKey
*/
private function create($table,
$data,
$foreignKey) { $query =
$this->connection->
createQueryBuilder();
$foreignKeyColumn =
$this->mapping->
getTableForeignKey($table);
$data[$foreignKeyColumn] =
$foreignKey;
$query->
insert($table);
foreach ($data as $key =>
$value) { $query->
setValue($key, ':' .
$key);
$query->
setParameter(':' .
$key,
$value);
} $query->
execute();
} /**
* Updates an existing attribute
*
* @param string $table
* @param array $data
* @param int|string $foreignKey
*/