title: Multiple level of different kind of inheritance
body: <p>For my project, I'm trying to use the inheritance feature of Doctrine. I need to represent medias (through different tables : one table for uploaded documents, one for linked videos, ... and so on).</p>
  
  <p>But, the videos can vary from provider to provider (such as Youtube, Dailymotion, you name it). So, I was thinking of doing another inheritance, proper to the Video table, through a <code>SINGLE_TABLE</code> inheritance.</p>
  
  <p>But, when I declare my entities, it seems that if I add the <code>SINGLE_TABLE</code> inheritance annotation on the <code>AbstractVideo</code> entity, which extends the <code>AbstractMedia</code> Entity, the <code>Video</code> table is never created (nor detected). Here is a snippet of these two entities :</p>
  
  <pre><code>&lt;?php
  namespace Acme\Demo\Entity;
  
  use Datetime;
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Entity
   * @ORM\Table(name="Media")
   * @ORM\InheritanceType("JOINED")
   * @ORM\DiscriminatorColumn(name="type", type="string")
   */
  abstract class AbstractMedia
  {
      /**
       * @ORM\Id
       * @ORM\Column(type="integer")
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      private $id;
  
      // some other fields
  }
  
  /**
   * @ORM\Entity
   * @ORM\Table(name="Video")
   * @ORM\InheritanceType("SINGLE_TABLE")
   * @ORM\DiscriminatorColumn(name="provider", type="string")
   * @ORM\DiscriminatorMap({})
   */
  abstract class AbstractVideo extends AbstractMedia
  {
      /** @ORM\Column(type="string") */
      private $name;
  
      // some other fields
  }
  </code></pre>
  
  <p>I already tried to have a mapped entity to a <code>Foo</code> entity, extending the <code>AbstractVideo</code>, but then when I try to persist something, it says that it is not a valid entity.</p>
  
  <p>Any ideas, or should I really avoid such deep inheritance ? Thanks</p>