public function update(CustomerCompanyEntity $entity) { if (!$entity->isDirty()) { return false; } $sql = 'UPDATE customer_company SET %s WHERE customer_id = ?'; $sql = sprintf($sql, $this->arrayToQueryColumns($entity->getDirty())); $this->database->query($sql, array_values($entity->getDirty() + [$entity->getCustomerId()])); }