-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Labels
Description
When using the RoutingBundle with multiple document managers (e.g. when using multiple workspaces), I think it would be better for it to add a DoctrinePhpcrMappingsPass
compiler pass for each document manager, as seen in the CmfRoutingBundle class.
Without this, a user of the bundle can run into problems where classes are not mapped correctly, e.g. when working with a document manager other than the default. See this topic for details.
Possible approaches:
- Automatically loop through all the managers specified in doctrine_phpcr -> odm ?
- Or a manual setting?
cmf_routing:
dynamic:
manager_name: published
mapped_managers: [ preview, published ]
I don't mind doing a PR if it makes sense to change this. If not, then maybe I should update the documentation, because the user of the bundle currently needs to add similar compiler pass code into their own bundle class.