Symfony2 “class not found in the chain” in two bundle relationship

前端 未结 1 1003
日久生厌
日久生厌 2021-01-19 02:58

In an attempt to define a one-to-many relationship across bundles the following occurs:

The class \'Mana\\ClientBundle\\Entity\\Member\' was not found

相关标签:
1条回答
  • 2021-01-19 03:46

    You should see Using Relationships with Multiple Entity Managers

    A cross-bundle relationship cannot be managed by Doctrine if you have separate databases with separate connections and entity managers. Instead, in this case, the Client entity would have to reside in the same schema/bundle and be periodically refreshed from the external source.

    But if you have only one connection to the database and one entity manager for it you can manage cross-bundle relationships. (Described here: OneToMany Relation on cross project entities (Symfony2/Doctrine))

    0 讨论(0)
提交回复
热议问题