Relations between tables | Sololearn: Learn to code for FREE!

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

12/24/2017 7:51:26 PM

Daniel David Díaz González

2 Answers

New Answer

+7

https://stackoverflow.com/questions/18869578/doctrine-2-multiple-relations-between-two-tables maybe its hepful

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