Undefined index on doctrine m:n relation
I'm having the same trouble, and the answers on StackOverflow while correct dont go deep enough. I found in one of the Doctrine jira issues:
If you run
doctrine:schema:validate
then it will tell you what the problem is.
You are probably missing something in your function notations.. have a look at this:
It seems you are missing @JoinTable notation - maybe try to invert Owning and Inverse side?