Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
To use annotations, files must be removed#6251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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 athttp://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.
| If you want to use annotations, you must remove the XML (or YAML) files | ||
| after running these two commands. It is `not possible to mix XML/YAML metadata | ||
| definitions with annotated PHP entity class definitions | ||
| <http://symfony.com/doc/current/book/doctrine.html#add-mapping-information>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The addition is nice, but we should use theref role to link to that section like this (I would also reword this a bit):
If you want to use annotations, you must remove the XML (or YAML) filesafter running these two commands. This is necessary as:ref:`it is not possible to mix mapping configuration formats<book-doctrine-adding-mapping>`.
OskarStark commentedFeb 11, 2016
this should be merged to prior branches, too what do you think@xabbuh ? |
xabbuh commentedFeb 11, 2016
Yes, we will do that when merging the PR. |
OskarStark commentedFeb 14, 2016
👍 |
pbowyer commentedFeb 17, 2016
Thanks@xabbuh I've updated the PR in line with your comment. |
xabbuh commentedFeb 17, 2016
👍 |
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/AI'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 athttp://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 comment6a526bf To use annotations, files must be removed
weaverryan commentedFeb 21, 2016
Thanks Peter! I merged this into the 2.3 branch and changed the block also to be a |
I'm proposing this change after spending an hour trying to work out why my Repository class wasn't loading.
Thanks to
ysor123on 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 athttp://symfony.com/doc/current/book/doctrine.html#add-mapping-information:
It'd be great to clarify this for future readers.