mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1089: Annotations reference examples are inaccurate and confusing #1365
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Mar 30, 2011).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user mvl:
In chapter 19 of the reference guide some coding examples seem to be inaccurate or incorrect. Especially when it comes to the bidirectional many-to-many associations, this might be confusing.
Example:
The code fragment on http://www.doctrine-project.org/docs/orm/2.0/en/reference/annotations-reference.html#annref-manytomany has the following issues:
Some other code fragments in chapter 19 have similar issues. I think they could easily be replaced by the examples from the earlier chapters, like for the bidirectional man-to-many association the example from chapter 5:
http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html#many-to-many-bidirectional
@billschaller commented on GitHub (Jan 6, 2016):
This is a somewhat valid qualm with the annotation reference docs. The mappings are pretty well documented elsewhere, and this is mostly intended as a reference for usage of the annotations themselves though. As for the cited @ManyToMany example, it appears the inverse side is called $features while the inverse fk is user_id. The inverse fk should probably be called feature_id. I don't think it's necessary to have a full class decl, but splitting the code block would make sense.
The annotation reference has improved quite a bit since this ticket was logged. I don't think much action is warranted here.
@malukenho commented on GitHub (Jan 12, 2017):
@lcobucci ca be closed as documentation was improved since then.