Adding orm: and mongodb: annotation aliases to avoid conflicts. Recommended is to use the aliases instead of relying on the default namespace for annotations.
/** @orm:Entity */ /** @mongodb:Document */
This commit is contained in:
parent
0fc8906feb
commit
8fbf19694f
@ -45,6 +45,11 @@
|
||||
<service id="doctrine.orm.metadata_driver.annotation" class="Doctrine\ORM\Mapping\Driver\AnnotationDriver">
|
||||
<argument type="service" id="doctrine.orm.metadata_driver.annotation.reader" />
|
||||
<argument>%doctrine.orm.metadata_driver.entity_dirs%</argument>
|
||||
<call method="setDefaultAnnotationNamespace"><argument>%doctrine.orm.metadata.annotation_default_namespace%</argument></call>
|
||||
<call method="setAnnotationNamespaceAlias">
|
||||
<argument>Doctrine\ORM\Mapping\</argument>
|
||||
<argument>orm</argument>
|
||||
</call>
|
||||
</service>
|
||||
|
||||
<service id="doctrine.orm.metadata_driver.annotation.reader" class="Doctrine\Common\Annotations\AnnotationReader">
|
||||
|
@ -57,6 +57,10 @@
|
||||
<service id="doctrine.odm.mongodb.metadata.annotation_reader" class="%doctrine.odm.mongodb.metadata.annotation_reader_class%">
|
||||
<argument type="service" id="doctrine.odm.mongodb.cache" />
|
||||
<call method="setDefaultAnnotationNamespace"><argument>%doctrine.odm.mongodb.metadata.annotation_default_namespace%</argument></call>
|
||||
<call method="setAnnotationNamespaceAlias">
|
||||
<argument>Doctrine\ODM\MongoDB\Mapping\</argument>
|
||||
<argument>mongodb</argument>
|
||||
</call>
|
||||
</service>
|
||||
<service id="doctrine.odm.mongodb.metadata.xml" class="%doctrine.odm.mongodb.metadata.xml_class%"><argument>%doctrine.odm.mongodb.xml_mapping_dirs%</argument></service>
|
||||
<service id="doctrine.odm.mongodb.metadata.yml" class="%doctrine.odm.mongodb.metadata.yml_class%"><argument>%doctrine.odm.mongodb.yml_mapping_dirs%</argument></service>
|
||||
|
Reference in New Issue
Block a user