class ReferencePrimer (View source)
The ReferencePrimer is responsible for priming reference relationships.
Priming a field mapped as either reference-one or reference-many will load the referenced document(s) eagerly and avoid individual lazy loading through proxy object initialization.
Priming can only be used for the owning side side of a relationship, since the referenced identifiers are not immediately available on an inverse side.
at line 99
primeReferences(ClassMetadata $class, array|Traversable $documents, string $fieldName, array $hints = , callable|null $primer = null)
Prime references within a mapped field of one or more documents.
If a $primer callable is provided, it should have the same signature as the default primer defined in the constructor. If $primer is not callable, the default primer will be used.