Skip to content

Commit 364f680

Browse files
thienvu18sampoyigi
andauthored
Add table prefix to related table in search query (#960)
* Change modules branch alias to 3.x Signed-off-by: Sam Poyigi <[email protected]> * Require core modules Signed-off-by: Sam Poyigi <[email protected]> * Add table prefix to related table in search query * refactor Signed-off-by: Sam Poyigi <[email protected]> Co-authored-by: Sam Poyigi <[email protected]> Co-authored-by: Sam Poyigi <[email protected]>
1 parent c327804 commit 364f680

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/admin/widgets/Lists.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public function prepareModel()
278278
foreach ($searchableColumns as $column) {
279279
// Relation
280280
if ($this->isColumnRelated($column)) {
281-
$table = $this->model->makeRelation($column->relation)->getTable();
281+
$table = DB::getTablePrefix().$this->model->makeRelation($column->relation)->getTable();
282282
$columnName = isset($column->sqlSelect)
283283
? DB::raw($this->parseTableName($column->sqlSelect, $table))
284284
: $table.'.'.$column->valueFrom;

0 commit comments

Comments
 (0)