Reputation: 5607
I can't get this to work, so not sure if it is possible.
I want to place a Doctrine2's entity_name.orm.yml config file in a different location to the default ({bundle}/resources/config/doctrine).
Is this possible?
Ideally I could just specify a location.
Even better I could specify some config data in the default file location and also specify additional in a second config file, in a different location.
I know other Symfony2 config files can be done like this, but I can't get this to work with Doctrine/Symfony2
Upvotes: 0
Views: 283
Reputation: 9246
Yes you can, you just need to tell doctrine where to look for them:
doctrine
orm:
# your entity manager name here
default:
mappings:
# An array of mappings, which may be a bundle name or something else
mapping_name:
mapping: true
type: ~
dir: ~
alias: ~
prefix: ~
is_bundle: ~
See Doctrine Mapping Configuration Reference for details on each of these options.
Upvotes: 2
Reputation: 1847
You can use imports in your config.yml:
imports:
- { resource: doctrine.yml }
Upvotes: 0