Reputation: 123
a short question: How to switch to the another metadata driver than annotation. How to set the metadata driver "yml" in the config.yml?
I`ve searched google and the symfony2 docu, but didnt find anything :(
thanks
Upvotes: 2
Views: 2843
Reputation: 75
I realize this is an older question but you can explicitly require that doctrine use the yml driver for meta data like this:
doctrine:
orm:
entity_managers:
mappings:
MyBundleName:
type: yml
dir: path/to/ymlmetadata
Be aware that if you use this configuration style then you have to put the "defaults" config node under entity_managers instead of its usual location.
Upvotes: 1
Reputation: 105918
You should be able to do that with the doctrine:mapping:convert
command
php app/console doctrine:mapping:convert --force yml ./src/
Double check all the options available before you run the command, though
php app/console help doctrine:mapping:convert
Upvotes: 10