+ 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.
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.