Home > Article > Backend Development > symfony2-one-to-many relationship between entities in different bundles
Key point: In fact, it is the same as in a normal bundle, just write the entire entity address. C Example: om om om
Shopone (one side)
The corresponding relationship of the COMMENTONE entity in UserBundle
Use the corresponding relationship of the SHOPONE entity in adminbundle
Use in the controller :
Database results:
table shopone
table comment
The above introduces the one-to-many relationship between symfony2-entities in different bundles, including aspects of the relationship. I hope it will be helpful to friends who are interested in PHP tutorials.
🎜 🎜