- Fixed a recurrent bug within deleteOne() method

This commit is contained in:
Dave M. 2024-02-01 16:17:08 +00:00
parent fa4e686f35
commit 15be1597b8
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ class ConnectionAdapter
$this->adapter = $this->instanciateAdapter($adapterName);
}
else {
throw new \InvalidArgumentException("Adapter not found within your configuration array.");
throw new \InvalidArgumentException(sprintf("Adapter not found within your configuration array. (%s)", json_encode($connection)));
}
$this->adapter->setup($connection);

View File

@ -114,7 +114,7 @@ class Repository
throw new Exception\EntityPrimaryKeyUnknown("A primary key value has to be defined to delete an item.");
}
return (bool) $this->wherePrimaryKey($value, null)->deleteOne()->rowCount;
return (bool) $this->wherePrimaryKey($value, false)->deleteOne()->rowCount;
}
public function destroy(object $entity) : bool