also handle not null violations
This commit is contained in:
parent
7ba715d144
commit
895fd49fb2
|
@ -263,7 +263,7 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
|
||||||
}, array_merge($keys, $values))
|
}, array_merge($keys, $values))
|
||||||
);
|
);
|
||||||
return $insertQb->execute();
|
return $insertQb->execute();
|
||||||
} catch (\Doctrine\DBAL\Exception\UniqueConstraintViolationException $e) {
|
} catch (\Doctrine\DBAL\Exception\ConstraintViolationException $e) {
|
||||||
// value already exists, try update
|
// value already exists, try update
|
||||||
$updateQb = $this->getQueryBuilder();
|
$updateQb = $this->getQueryBuilder();
|
||||||
$updateQb->update($table);
|
$updateQb->update($table);
|
||||||
|
|
Loading…
Reference in New Issue