Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 89cb981

Browse filesBrowse files
committed
minor #6251 To use annotations, files must be removed (pbowyer)
This PR was submitted for the 3.0 branch but it was merged into the 2.3 branch instead (closes #6251). Discussion ---------- To use annotations, files must be removed | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | Tested on 3.0 | Fixed tickets | N/A I'm proposing this change after spending an hour trying to work out why my Repository class wasn't loading. Thanks to `ysor123` on IRC, we diagnosed the problem was the XML mapping files generated when reverse engineering my database, which I hadn't deleted. This is obliquely referred to at http://symfony.com/doc/current/book/doctrine.html#add-mapping-information: > A bundle can accept only one metadata definition format. For example, it's not possible to mix YAML metadata definitions with annotated PHP entity class definitions. It'd be great to clarify this for future readers. Commits ------- 06de6c0 Updated per xabbuh's comment 6a526bf To use annotations, files must be removed
2 parents 68cdbee + 06de6c0 commit 89cb981
Copy full SHA for 89cb981

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎cookbook/doctrine/reverse_engineering.rst

Copy file name to clipboardExpand all lines: cookbook/doctrine/reverse_engineering.rst
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ execute the second command only.
101101

102102
.. tip::
103103

104-
If you want to use annotations, you can safely delete the XML (or YAML) files
105-
after running these two commands.
104+
If you want to use annotations, you must remove the XML (or YAML) files
105+
after running these two commands. This is necessary as
106+
:ref:`it is not possible to mix mapping configuration formats <book-doctrine-adding-mapping>`
106107

107108
For example, the newly created ``BlogComment`` entity class looks as follow::
108109

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.