symfony2-不同bundle的entity的一对多关系

重点:其实和普通一个bundle中一样,只是把entity地址写全就行。

例子:

表commentone (多方)

表shopone(一方)

在Userbundle中的Commentone实体对应关系

在Adminbundle中的Shopone实体对应关系

在controller中使用:

 

数据库结果:

表shopone

 

表comment

 

 

posted on 2015-05-17 18:47  joelike  阅读(311)  评论(0)    收藏  举报

导航