Answer the question
In order to leave comments, you need to log in
How to make nested entities in Symfony in Doctrine?
The project needs to use the rest api for which the repositories are adapted to be used with the "DataRepository" (doctrine skeleton mapper).
An example of methods in the repository:
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): iterable
{
return $this->basicObjectRepository->findBy($criteria, $orderBy, $limit, $offset);
}
public function hydrate($object, array $data): void
{
$this->basicObjectRepository->hydrate($object, $data);
}
Answer the question
In order to leave comments, you need to log in
Add your method to the repository and use the joins in QueryBuilder in it.
By default, proxies are lazy loaded.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question