mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Do not use fetch join, as even with the N+1 problem the queries are faster than with the very complex and slow expressions needed for the fetch Join pagination
This commit is contained in:
parent
8ce5f4a796
commit
d59b8817c3
3 changed files with 102 additions and 13 deletions
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\Parts;
|
||||
|
||||
use App\Repository\PartLotRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use App\Entity\Base\AbstractDBElement;
|
||||
use App\Entity\Base\TimestampTrait;
|
||||
|
@ -79,7 +80,7 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
|||
* @var Storelocation|null The storelocation of this lot
|
||||
*/
|
||||
#[Groups(['simple', 'extended', 'full', 'import'])]
|
||||
#[ORM\ManyToOne(targetEntity: Storelocation::class)]
|
||||
#[ORM\ManyToOne(targetEntity: Storelocation::class, fetch: 'EAGER')]
|
||||
#[ORM\JoinColumn(name: 'id_store_location')]
|
||||
#[Selectable()]
|
||||
protected ?Storelocation $storage_location = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue