mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fetch preview attachment directly in table query.
This reduces the query count and therfore improves performance.
This commit is contained in:
parent
b0fd346369
commit
2e3c1d6c0a
1 changed files with 4 additions and 0 deletions
|
@ -82,10 +82,14 @@ class PartsDataTable implements DataTableTypeInterface
|
|||
->addSelect('footprint')
|
||||
->addSelect('manufacturer')
|
||||
->addSelect('partUnit')
|
||||
->addSelect('master_picture_attachment')
|
||||
->addSelect('footprint_attachment')
|
||||
->from(Part::class, 'part')
|
||||
->leftJoin('part.category', 'category')
|
||||
->leftJoin('part.master_picture_attachment', 'master_picture_attachment')
|
||||
->leftJoin('part.partLots', 'partLots')
|
||||
->leftJoin('part.footprint', 'footprint')
|
||||
->leftJoin('footprint.master_picture_attachment', 'footprint_attachment')
|
||||
->leftJoin('part.manufacturer', 'manufacturer')
|
||||
->leftJoin('part.orderdetails', 'orderdetails')
|
||||
->leftJoin('part.partUnit', 'partUnit');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue