Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDC-474: Confusing examples for @ManyToMany in Annotations Reference #4977

Closed
doctrinebot opened this issue Mar 25, 2010 · 3 comments
Closed
Assignees
Milestone

Comments

@doctrinebot
Copy link

Jira issue originally created by user @hobodave:

See: http://www.doctrine-project.org/documentation/manual/2_0/en/annotations-reference#reference:@manytomany

/****
 * Owning Side
 *
 * @ManyToMany(targetEntity="Group")
 * @JoinTable(name="user_groups",
 *      joinColumns={@JoinColumn(name="user_id", referencedColumnName="id")},
 *      inverseJoinColumns={@JoinColumn(name="group_id", referencedColumnName="id")}
 *      )
 */
private $phonenumbers;

/****
 * Inverse Side
 *
 * @ManyToMany(targetEntity="Feature", mappedBy="product")
 */
private $features;

Phonenumbers has an M:N relationship with Group through user_groups table, huh? The inverse of this is Products to Feature?

@doctrinebot
Copy link
Author

Comment created by @beberlei:

I must have been on crack while copy-pasting this together ;-)

@doctrinebot
Copy link
Author

Comment created by @beberlei:

Fixed, manual will auto-update in the next 24 hours

@doctrinebot
Copy link
Author

Issue was closed with resolution "Fixed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants