Created
September 22, 2012 12:08
-
-
Save marzocchi/3765995 to your computer and use it in GitHub Desktop.
Use ClassMetadata as a service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
# Use an entity's ClassMetadata as if it where a service (for example, in | |
# other services definitions). | |
# | |
# See http://symfony.com/doc/2.0/components/dependency_injection/factories.html | |
foo.foo_class_metadata: | |
class: "Doctrine\\Common\\Persistence\\Mapping\\ClassMetadata" | |
factory_service: doctrine.orm.entity_manager | |
factory_method: getClassMetadata | |
arguments: | |
# Fully-qualified entity class name | |
- "Foo\\Bundle\\FooBundle\\Entity\\Foo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment