Relations between tables | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Relations between tables

I need to know how to make a query with Symfony in relationship between two tables ManyToMany. I know how to insert using doctrine but when I make the select all the registry is empty.

24th Dec 2017, 7:51 PM
Daniel David Díaz González
Daniel David Díaz González - avatar
2 Answers
+ 2
I just realized what my problem was. The best of Doctrine is in his code, we only need to do our model and Doctrine does the rest for us, if you write the annotations @ManytoMany and the intermediate table; in the controller we just need to write the same we do for selecting all, findAll, and like I say before Doctrine does the rest, all that joins and querys. If you want to personalize that querys then use the Repositories. So, I invite to learn Symfony, is a very good framework to learn and if you want to do strong web apps you can start in it. Thanks and good day.
10th Jan 2018, 2:24 PM
Daniel David Díaz González
Daniel David Díaz González - avatar