title: Self referencing addReference getReference in the same fixture
body: <p>I have a simple question about Fixtures in Symfony and Doctrine.
  I have an Entity &quot;Project&quot; and I would like to self-referencing this project. For example I tried this :</p>
  <pre><code>$project1 = new Question();
  $this-&gt;addReference(&quot;initiatives&quot;, $project1); //referencing
  $project1-&gt;setItem('Project Initiatives');
  $project1-&gt;setInverse(false);
  $project1-&gt;setProjectHead($this-&gt;getReference(&quot;initiatives&quot;)); // get the reference of himself 
  $manager-&gt;persist($project1);
  </code></pre>
  <p>My entity (extract) :</p>
  <pre><code>/**
   * @ORM\ManyToOne(targetEntity=Project::class, inversedBy=&quot;projects&quot;)
   */
  private $project_head;
  
  /**
   * @ORM\OneToMany(targetEntity=Project::class, mappedBy=&quot;project_head&quot;)
   */
  private $projects;
  
  public function setProjectHead(?self $project_head): self
  {
      $this-&gt;project_head = $project_head;
  
      return $this;
  }
  </code></pre>
  <p>But It does not work. I have this error :
  SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails</p>
  <p>I have just ONE line in my db.
  I think he can't UDPATE because when I try to add others fixtures, the message appears. But I don't know how to fix this.</p>
  <p>Thanks a lot for helping</p>