title: Doctrine2 orphanRemoval ManyToMany only if there are no other records connected
body: <p>My purpose is to remove the record in the entity artist only if there are no other records of the entity connected soundtrack.</p>
  
  <p>I tried with orphanRemoval in this way:</p>
  
  <p><strong>Soundtrack.php</strong></p>
  
  <pre><code>/**
   * @Assert\NotBlank(message = "soundtrack.artists.blank")
   * @ORM\ManyToMany(targetEntity="Artist", inversedBy="soundtrack", cascade={"persist", "remove"}, orphanRemoval=true)
   * @ORM\JoinTable(name="soundtrack_artist")
   * @ORM\OrderBy({"name" = "ASC"})
   **/
  private $artists;
  </code></pre>
  
  <p><strong>Artist.php</strong></p>
  
  <pre><code>/**
   * @ORM\ManyToMany(targetEntity="Soundtrack", mappedBy="artists")
   */
  private $soundtrack;
  </code></pre>
  
  <p>but when I delete an entity record soundtrack, also clears the record of the entity artist even if it is linked to other records soundtrack (I think this is what you should expect from orphanRemoval).</p>
  
  <p>Is there a way to remove that record an "orphan" only when no other records connected?</p>
  
  <p>I also tried just like this:</p>
  
  <pre><code>**Soundtrack.php**
  
  /**
   * @Assert\NotBlank(message = "soundtrack.artists.blank")
   * @ORM\ManyToMany(targetEntity="Artist", inversedBy="soundtrack", cascade={"persist"}, orphanRemoval=true)
   * @ORM\JoinTable(name="soundtrack_artist")
   * @ORM\OrderBy({"name" = "ASC"})
   **/
  private $artists;
  </code></pre>
  
  <p>but does not delete the records entity artist ..</p>