mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Put FetchJoin Adapter logic into its own class.
This commit is contained in:
parent
ece3a464ce
commit
72e2c0cd6e
3 changed files with 170 additions and 68 deletions
|
@ -25,6 +25,7 @@ declare(strict_types=1);
|
|||
namespace App\DataTables;
|
||||
|
||||
use App\DataTables\Adapter\CustomORMAdapter;
|
||||
use App\DataTables\Adapter\FetchJoinORMAdapter;
|
||||
use App\DataTables\Column\EntityColumn;
|
||||
use App\DataTables\Column\LocaleDateTimeColumn;
|
||||
use App\DataTables\Column\MarkdownColumn;
|
||||
|
@ -215,8 +216,8 @@ final class PartsDataTable implements DataTableTypeInterface
|
|||
])
|
||||
|
||||
->addOrderBy('name')
|
||||
->createAdapter(CustomORMAdapter::class, [
|
||||
'allow_fetch_join' => true,
|
||||
->createAdapter(FetchJoinORMAdapter::class, [
|
||||
'simple_total_query' => true,
|
||||
'query' => function (QueryBuilder $builder): void {
|
||||
$this->getQuery($builder);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue