Answer the question
In order to leave comments, you need to log in
How to request multiple Posts along with tags in Doctrine/Symfony?
Like a standard situation. But failed to implement. There are three tables
Table_Posts (post_id, text, other_data)
Table_Tags (tag_id, title, other_data)
Table_Posts_Tags (post_id, tag_id)
Answer the question
In order to leave comments, you need to log in
Not for everyone :)
It is necessary either to add a mode for the relationship. fetch="EAGER"
Or, if it is not always necessary to load tags, to load a post with tags, make a separate method in the repository in which JOIN will be performed.
fetch mode documentation
Try using the paginator
docs.doctrine-project.org/projects/doctrine-orm/en...
Or you can do it yourself in the repository.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question