public function hardDelete(EntityInterface $entity)
{
if (!$this->delete($entity)) {
return false;
}
$primaryKey = (array) $this->primaryKey();
$query = $this->query();
$conditions = (array) $entity->extract($primaryKey);
$statement = $query->delete()->where($conditions)->execute();
$success = $statement->rowCount() > 0;
if (!$success) {
return $success;
}
return $success;
}