title: Join columns by referencedColumnName that is not primary key - id
body: <p>I am rookie in Symfony Doctrine and need some help with Join entities.</p>
  
  <p>Normally Column are joins by primary key ID</p>
  
  <pre class="lang-php prettyprint-override"><code>    /**
       * User
       *
       * @ORM\Table(name="users")
       * @ORM\Entity(repositoryClass="MainBundle\Repository\UserRepository")
       * UniqueEntity("email", message="Account with email already exists.")
       */
      class User implements AdvancedUserInterface, \Serializable
      {
      /**
           * @var \MainBundle\Entity\PersonDetails
           *
           * @ORM\ManyToOne(targetEntity="MainBundle\Entity\Person")
           * @ORM\JoinColumns({
           *  @ORM\JoinColumn(name="person_details_id", referencedColumnName="id", nullable=true)
           * })
           */
      private $personDetails = null;
  </code></pre>
  
  <p>This is ok.</p>
  
  <p>But problem is that I want to Join two columns in Relation OneToOne by id field in User Entity </p>
  
  <pre class="lang-php prettyprint-override"><code>
      /**
       * User
       *
       * @ORM\Table(name="users")
       * @ORM\Entity(repositoryClass="MainBundle\Repository\UserRepository")
       * UniqueEntity("email", message="Account with email already exists.")
       */
      class User implements AdvancedUserInterface, \Serializable
      {
      /**
           * @var \MainBundle\Entity\PersonDetails
           *
           * @ORM\ManyToOne(targetEntity="MainBundle\Entity\Person")
           * @ORM\JoinColumn(name="id", referencedColumnName="user_id", nullable=true)
               * })
               */
          private $personDetails = null;
  </code></pre>
  
  <p>When I try to join columns on this way I get error</p>
  
  <blockquote>
    <p>Missing value for primary key id on MainBundle\Entity\PersonDetails</p>
  </blockquote>
  
  <p>Is it possible to index other field than id or what I trying to do is impossible?</p>
  
  <p>Thanks guys.</p>