title: Integrity constraint violation: 1048 Column 'announcement_id' cannot be null
body: <p>I have two models : Entity\Announcement.php and Entity\Submission.php.</p>
  
  <p>In my Entity\Submission.php, I defined a relation with Entity\Announcement.php like this :</p>
  
  <pre><code> /**
   * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Announcement")
   * @ORM\JoinColumn(nullable=false)
   */
  protected $announcement;
  </code></pre>
  
  <p>When users visit an Announcement they have the ability to submit a proposal.</p>
  
  <p>In my controller, I defined the submit action like this :</p>
  
  <pre><code>/**
   * @Route("/submit/{id}", name="submissions_new")
   */
  public function submitAction(Request $request, Announcement $id)
  {
      $submission = new Submission();
      $submission-&gt;setAnnouncement($id);
  
      $form = $this-&gt;createForm(SubmissionType::class);
  
      $form-&gt;handleRequest($request);
  
      if ($form-&gt;isSubmitted() &amp;&amp; $form-&gt;isValid()) {
  
          $em = $this-&gt;getDoctrine()-&gt;getManager();
  
          $submission = $form-&gt;getData();
  
          $em-&gt;persist($submission);
          $em-&gt;flush();
  
          return $this-&gt;redirectToRoute('announcements_list');
      }
  
      return $this-&gt;render(':submissions:submit.html.twig', [
          'form' =&gt; $form-&gt;createView(),
          'announcement' =&gt; $id-&gt;getId()
      ]);
  }
  </code></pre>
  
  <p>When I try to submit from my route /submit/73c67a07-744d-11e7-9670-08d40c1d4f7f, I get this error :</p>
  
  <pre><code>An exception occurred while executing 'INSERT INTO reports (id, title, date, author, description, announcement_id) VALUES (?, ?, ?, ?, ?, ?)' with params ["ff28c231-7843-11e7-a72b-08d40c1d4f7f", "aaa", "2012-01-01 00:00:00", "aaa", "aaa", null]:
  
  Integrity constraint violation: 1048 Column 'announcement_id' cannot be null
  </code></pre>
  
  <p>When I comment this line in my controller :</p>
  
  <pre><code>//$submission = $form-&gt;getData();
  </code></pre>
  
  <p>and try to submit again, I get this error :</p>
  
  <pre><code>An exception occurred while executing 'INSERT INTO reports (id, title, date, author, description, announcement_id) VALUES (?, ?, ?, ?, ?, ?)' with params ["d12ea15b-7843-11e7-a72b-08d40c1d4f7f", null, null, null, null, "73c67a07-744d-11e7-9670-08d40c1d4f7f"]:
  
  SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null
  </code></pre>
  
  <p>Could you please help to submit all fields ?</p>
  
  <p>Thank you</p>