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

Closed
doctrinebot opened this Issue Mar 25, 2010 · 3 comments

2 participants

@doctrinebot

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

Comment created by @beberlei:

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

@doctrinebot

Comment created by @beberlei:

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

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.0-BETA1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment