Skip to content

Loading…

DDC-2792: [GH-846] joinColumn is not required in manyToMany #3541

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of terraqout:

Url: #846

Message:

in annotation you can don't write columns names:

/****
 * @ManyToMany(targetEntity="Group", inversedBy="users")
 * @JoinTable(name="users_groups")
 */

but in yaml you should:

manyToMany:
    groups:
        targetEntity: Group
        inversedBy: users
        joinTable:
            name: users_groups
        joinColumns:
            user_id:
            referencedColumnName: id
        inverseJoinColumns:
            group_id:
            referencedColumnName: id

this patch fixes this unexpected behavior

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-846] was closed:
#846

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.5 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
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.