Skip to content

Commit 288692b

Browse files
committed
fix table name
1 parent 95b1c00 commit 288692b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

code/SoftDeleteSearchFilter.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected function applyOne(DataQuery $query)
3030
{
3131
$this->model = $query->applyRelation($this->relation);
3232
$schema = DataObjectSchema::singleton();
33-
$tableName = $schema->tableName($this->model);
33+
$tableName = $schema->tableForField($this->model, 'Deleted');
3434

3535
$query = $query->setQueryParam("SoftDeletable.filter", false);
3636
if ($this->getOnlyDeleted() || $this->name == "OnlyDeleted") {
@@ -44,7 +44,7 @@ protected function applyMany(DataQuery $query)
4444
{
4545
$this->model = $query->applyRelation($this->relation);
4646
$schema = DataObjectSchema::singleton();
47-
$tableName = $schema->tableName($this->model);
47+
$tableName = $schema->tableForField($this->model, 'Deleted');
4848

4949
$query = $query->setQueryParam("SoftDeletable.filter", false);
5050
if ($this->getOnlyDeleted() || $this->name == "OnlyDeleted") {
@@ -58,7 +58,7 @@ protected function excludeOne(DataQuery $query)
5858
{
5959
$this->model = $query->applyRelation($this->relation);
6060
$schema = DataObjectSchema::singleton();
61-
$tableName = $schema->tableName($this->model);
61+
$tableName = $schema->tableForField($this->model, 'Deleted');
6262

6363
$query = $query->setQueryParam("SoftDeletable.filter", true);
6464
if ($this->getOnlyDeleted() || $this->name == "OnlyDeleted") {
@@ -72,7 +72,7 @@ protected function excludeMany(DataQuery $query)
7272
{
7373
$this->model = $query->applyRelation($this->relation);
7474
$schema = DataObjectSchema::singleton();
75-
$tableName = $schema->tableName($this->model);
75+
$tableName = $schema->tableForField($this->model, 'Deleted');
7676

7777
$query = $query->setQueryParam("SoftDeletable.filter", true);
7878
if ($this->getOnlyDeleted() || $this->name == "OnlyDeleted") {

0 commit comments

Comments
 (0)