title: Undefined index: joinColumns doctrine + symfony2
body: <p>I have the following structure of Entities in my project.</p>
  
  <pre><code>class MyEntity
  {
   [... some more fields...]
   /**
   * @Type("array&lt;string, string&gt;")
   * @ORM\ManyToMany(targetEntity="Me\MyBundle\Entity\Example")
   * @ORM\JoinTable(name="example_myentity",
   *      joinColumns={@ORM\JoinColumn(name="plan_id", referencedColumnName="id")},
   *      inverseJoinColumns={@ORM\JoinColumn(name="example", referencedColumnName="label")}
   * )
   */
  private $example;
  }
  
  
  
  class Example
  {
  
  /**
   * @ORM\Id
   * @ORM\Column(name="label", type="string", length=50, unique=true, nullable=false)
   */
  private $label;
  }
  </code></pre>
  
  <p>When i tried to get "$example" using the findby() function from Doctrine i got the following  notice: </p>
  
  <blockquote>
    <p>Undefined index: joinColumns</p>
  </blockquote>
  
  <p>I tried to debug it, and the problem seems to be in the doctrine file BasicEntityPersister.php in the function</p>
  
  <pre><code> _getSelectEntitiesSQL($criteria, $assoc = null, $lockMode = 0, $limit = null, $offset = null, array $orderBy = null),
  </code></pre>
  
  <p>I observed in the stack trace that <strong>the second parameter "$assoc" is always null</strong>, and I think it's why Doctrine doesn't make the JOIN statement.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks</p>