From 288692b0b63c7d9b02dd31633f15604975dc56cb Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 10 Nov 2021 10:09:36 +0100 Subject: [PATCH] fix table name --- code/SoftDeleteSearchFilter.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/SoftDeleteSearchFilter.php b/code/SoftDeleteSearchFilter.php index d6a51ed..2fb34fe 100644 --- a/code/SoftDeleteSearchFilter.php +++ b/code/SoftDeleteSearchFilter.php @@ -30,7 +30,7 @@ protected function applyOne(DataQuery $query) { $this->model = $query->applyRelation($this->relation); $schema = DataObjectSchema::singleton(); - $tableName = $schema->tableName($this->model); + $tableName = $schema->tableForField($this->model, 'Deleted'); $query = $query->setQueryParam("SoftDeletable.filter", false); if ($this->getOnlyDeleted() || $this->name == "OnlyDeleted") { @@ -44,7 +44,7 @@ protected function applyMany(DataQuery $query) { $this->model = $query->applyRelation($this->relation); $schema = DataObjectSchema::singleton(); - $tableName = $schema->tableName($this->model); + $tableName = $schema->tableForField($this->model, 'Deleted'); $query = $query->setQueryParam("SoftDeletable.filter", false); if ($this->getOnlyDeleted() || $this->name == "OnlyDeleted") { @@ -58,7 +58,7 @@ protected function excludeOne(DataQuery $query) { $this->model = $query->applyRelation($this->relation); $schema = DataObjectSchema::singleton(); - $tableName = $schema->tableName($this->model); + $tableName = $schema->tableForField($this->model, 'Deleted'); $query = $query->setQueryParam("SoftDeletable.filter", true); if ($this->getOnlyDeleted() || $this->name == "OnlyDeleted") { @@ -72,7 +72,7 @@ protected function excludeMany(DataQuery $query) { $this->model = $query->applyRelation($this->relation); $schema = DataObjectSchema::singleton(); - $tableName = $schema->tableName($this->model); + $tableName = $schema->tableForField($this->model, 'Deleted'); $query = $query->setQueryParam("SoftDeletable.filter", true); if ($this->getOnlyDeleted() || $this->name == "OnlyDeleted") {