Fetch associations extra lazy
This commit is contained in:
parent
a03c29bc64
commit
2f2a41f665
|
@ -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')]
|
||||||
|
|
Loading…
Reference in New Issue