mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-04-15 19:09:36 +00:00
Try to fix "Iterate with fetch join in class App\Entity\Parts\PartLot using association part not allowed." when opening BOM
This commit is contained in:
parent
2c607c7e26
commit
5c5c7cece1
1 changed files with 2 additions and 1 deletions
|
|
@ -185,7 +185,7 @@ class ProjectBomEntriesDataTable implements DataTableTypeInterface
|
|||
])
|
||||
->add('storageLocations', TextColumn::class, [
|
||||
'label' => 'part.table.storeLocations',
|
||||
'orderField' => 'NATSORT(MIN(storageLocations.name))',
|
||||
'orderField' => 'NATSORT(storageLocationOrder)',
|
||||
'visible' => false,
|
||||
'render' => function ($value, ProjectBOMEntry $context) {
|
||||
if ($context->getPart() !== null) {
|
||||
|
|
@ -226,6 +226,7 @@ class ProjectBomEntriesDataTable implements DataTableTypeInterface
|
|||
{
|
||||
$builder->select('bom_entry')
|
||||
->addSelect('part')
|
||||
->addSelect('(SELECT MIN(storageLocationSort.name) FROM ' . \App\Entity\Parts\PartLot::class . ' partLotSort LEFT JOIN partLotSort.storage_location storageLocationSort WHERE partLotSort.part = part) AS HIDDEN storageLocationOrder')
|
||||
->from(ProjectBOMEntry::class, 'bom_entry')
|
||||
->leftJoin('bom_entry.part', 'part')
|
||||
->leftJoin('part.category', 'category')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue