Home  >  Article  >  Backend Development  >  symfony2-one-to-many relationship between entities in different bundles

symfony2-one-to-many relationship between entities in different bundles

WBOY
WBOYOriginal
2016-08-08 09:24:061061browse

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.

🎜 🎜
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn