Skip to content

Commit

Permalink
Update ManyToMany.php
Browse files Browse the repository at this point in the history
  • Loading branch information
freost committed Apr 2, 2024
1 parent d5a21a5 commit 3cf97e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mako/database/midgard/relations/ManyToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

use Closure;
use mako\database\connections\Connection;
use mako\database\exceptions\DatabaseException;
use mako\database\midgard\ORM;
use mako\database\midgard\ResultSet;
use mako\database\query\Query;
use mako\database\query\Raw;
use RuntimeException;

use function array_combine;
use function array_diff;
Expand Down Expand Up @@ -354,7 +354,7 @@ public function unlink(mixed $id = null, array $attributes = []): bool
public function synchronize(array $ids, array $attributes = []): bool
{
if (!empty($attributes) && array_is_list($attributes)) {
throw new RuntimeException('Synchronize can only be used with a single set of attributes.');
throw new DatabaseException('Synchronize can only be used with a single set of attributes.');
}

$success = true;
Expand Down

0 comments on commit 3cf97e6

Please sign in to comment.