also handle not null violations

This commit is contained in:
Robin Appelman 2016-01-15 16:13:03 +01:00
parent 7ba715d144
commit 895fd49fb2
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
}, array_merge($keys, $values))
);
return $insertQb->execute();
} catch (\Doctrine\DBAL\Exception\UniqueConstraintViolationException $e) {
} catch (\Doctrine\DBAL\Exception\ConstraintViolationException $e) {
// value already exists, try update
$updateQb = $this->getQueryBuilder();
$updateQb->update($table);