Skip to content

Loading…

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

Closed
doctrinebot opened this Issue · 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
@doctrinebot doctrinebot added this to the 2.0-BETA1 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.