6

I am using JMSPaymentCoreBundle and JMSPaymentPaypalBundle.

It worked well before,but now I have to change my config.yml for new Bundle(FOSMessageBundle)

I have to stop using 'auto_mapping' and use 'entity_managers' instead

doctrine:
    dbal:

    orm:
        auto_generate_proxy_classes: %kernel.debug%
#       auto_mapping: true
        entity_managers:
            FOSUserBundle: ~
            FOSMessageBundle: ~

However after this changes .

 The service "payment.plugin_controller" has a dependency on a non-existent service "doctrine.orm.default_entity_manager"

this error happens.

I think changes in config.yml causes this trouble.

How can I solve this problem?

4

1 に答える 1

7

エラーによると、という名前のエンティティ マネージャーを定義する必要がありますdefault。あなたの場合、全体的な構文が間違っています。私の例を見てください。

config.yml で:

doctrine:
    orm:
        entity_managers:
            default: # that's the name of the entity manager
                connection: default # you need to define the default connection
                mappings: 
                    FOSUserBundle: ~
                    FOSMessageBundle: ~

「データベースと教義」「複数のエンティティマネージャーと接続を操作する方法」に関するドキュメントを読むことをお勧めします

于 2013-09-15T23:48:25.893 に答える