title: Not able to define column type in JoinColumn for a foreign key reference in Symfony2/Doctrine
body: <p>This seems like it should be an easy issue but I can't seem to get it solved.</p>
  
  <p>I have two Entities, Person and Flag. Flag has a ManyToOne relationship to Person. Where I'm running into an issue is that Person's id field is a bigint, not a type int.</p>
  
  <p>So, with syntax like this on the ManyToOne field on the Flag entity:</p>
  
  <pre><code>/**
   * @ORM\ManyToOne(targetEntity="Person", inversedBy="flags")
   * @ORM\JoinColumn(name="personId", referencedColumnName="id")
   */
  protected $person;
  </code></pre>
  
  <p>I get a Foreign Key error, something along the lines of </p>
  
  <pre><code>An exception occurred while executing 'ALTER TABLE flags ADD CONSTRAINT FK_B0541BAA20C4B1C FOREIGN KEY
  </code></pre>
  
  <p>I believe I've exhausted all other possibilities of this error besides it being generated because the personId field is an integer and the person's ID field is a bigint. These foreign key relationships have been working fine among other entities in this bundle, its only the Person and its bigint primary key that is causing issues.</p>
  
  <p>I can't add type="bigint" to JoinColumn without getting an error like:</p>
  
  <pre><code>The annotation @ORM\JoinColumn declared on property Acme\AcmeBundle\Entity\PersonFlag::$person does not have a pro
    perty named "type"
  </code></pre>
  
  <p>And, if I add Column annotation in order to declare the type, it just ignores the JoinColumn, as shown below:</p>
  
  <pre><code>/**
   * @ORM\ManyToOne(targetEntity="Person", inversedBy="flags")
   * @ORM\JoinColumn(name="personId", referencedColumnName="id")
   * @ORM\Column(type="bigint")
   */
  protected $person;
  </code></pre>
  
  <p>This doesn't generate any errors, but it creates a column named "person" that has no foreign keys.</p>
  
  <p>So, what am I missing, how can I go about adding this ManyToOne relationship to an entity that has a bigint as it's primary key?</p>
  
  <p>Here is the annotation for the Person entity's ID field:</p>
  
  <pre><code>/**
   * @ORM\Id
   * @ORM\Column(type="bigint")
   * @ORM\GeneratedValue(strategy="AUTO")
   */
  protected $id;
  </code></pre>
  
  <p>TY!</p>