diff options
Diffstat (limited to 'lib/private/DB/Connection.php')
-rw-r--r-- | lib/private/DB/Connection.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php index a39dbe3783c..4b1c560c5ca 100644 --- a/lib/private/DB/Connection.php +++ b/lib/private/DB/Connection.php @@ -34,6 +34,7 @@ use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Cache\QueryCacheProfile; use Doctrine\Common\EventManager; use Doctrine\DBAL\Platforms\MySqlPlatform; +use Doctrine\DBAL\Exception\ConstraintViolationException; use OC\DB\QueryBuilder\QueryBuilder; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; @@ -284,7 +285,7 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection { }, array_merge($keys, $values)) ); return $insertQb->execute(); - } catch (\Doctrine\DBAL\Exception\ConstraintViolationException $e) { + } catch (ConstraintViolationException $e) { // value already exists, try update $updateQb = $this->getQueryBuilder(); $updateQb->update($table); |