Fetch associations extra lazy

This commit is contained in:
Sebastian Meyer 2024-01-06 18:42:23 +01:00
parent a03c29bc64
commit 2f2a41f665
1 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ class Record
* The associated format. * The associated format.
*/ */
#[ORM\Id] #[ORM\Id]
#[ORM\ManyToOne(targetEntity: Format::class)] #[ORM\ManyToOne(targetEntity: Format::class, fetch: 'EXTRA_LAZY')]
#[ORM\JoinColumn(name: 'format', referencedColumnName: 'prefix')] #[ORM\JoinColumn(name: 'format', referencedColumnName: 'prefix')]
private Format $format; private Format $format;
@ -72,7 +72,7 @@ class Record
* *
* @var Collection<string, Set> * @var Collection<string, Set>
*/ */
#[ORM\ManyToMany(targetEntity: Set::class, inversedBy: 'records', indexBy: 'spec', cascade: ['persist'])] #[ORM\ManyToMany(targetEntity: Set::class, inversedBy: 'records', indexBy: 'spec', fetch: 'EXTRA_LAZY', cascade: ['persist'])]
#[ORM\JoinTable(name: 'records_sets')] #[ORM\JoinTable(name: 'records_sets')]
#[ORM\JoinColumn(name: 'record_identifier', referencedColumnName: 'identifier')] #[ORM\JoinColumn(name: 'record_identifier', referencedColumnName: 'identifier')]
#[ORM\JoinColumn(name: 'record_format', referencedColumnName: 'format')] #[ORM\JoinColumn(name: 'record_format', referencedColumnName: 'format')]