2016-09-23 72 views
1

我有多个管理和配置的其中一人就是这个样子实体管理器指定实体

doctrine: 
    orm: 
    entity_managers: 
     support: 
     connection: support 
     mappings: 
      APIBundle: ~ 

但也有几十APIBundle实体的,我只需要其中的一些在此经理。在这种情况下应该是什么样的正确配置?

回答

0

我在教条文档中找不到任何符合您要求的内容。

但是通过阅读the mapping part,我们可以想象一个小窍门,为经过:

定义你的实体在两个不同的文件夹:

APIBundle 
| 
--- Em1Entity 
| 
--- SupportEntity 

然后在你的配置,指定dir配置:

doctrine: 
    orm: 
    entity_managers: 
     support: 
     connection: support 
     mappings: 
      Support: 
      mapping:    true 
      type:     ~ 
      dir:     APIBundle\SupportEntity 
      alias:    ~ 
      prefix:    ~ 
      is_bundle:   ~ 

这只是一个猜测,我没有personnaly测试这个黑客。