title: How to define a Doctrine mappedSuperclass using XML or YAML instead of annotation mapping
body: <p>The following script comes from <a href="https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/inheritance-mapping.html#mapped-superclasses" rel="nofollow noreferrer">https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/inheritance-mapping.html#mapped-superclasses</a>, and was only changed to include a second sub-class.  It is my understanding that <code>MappedSuperclassBase</code> cannot exist by itself but must be extended by one and only one sub-class (i.e. either <code>EntitySubClassOne</code> or <code>EntitySubClassTwo</code>), and is the same concept as supertype/subtype for SQL.  Agree?</p>
  
  <p>How is a super/sub type defined using either YAML or XML instead of annotation mapping?</p>
  
  <pre><code>&lt;?php
  /** @MappedSuperclass */
  class MappedSuperclassBase
  {
      /** @Column(type="integer") */
      protected $mapped1;
      /** @Column(type="string") */
      protected $mapped2;
      /**
       * @OneToOne(targetEntity="MappedSuperclassRelated1")
       * @JoinColumn(name="related1_id", referencedColumnName="id")
       */
      protected $mappedRelated1;
  
      // ... more fields and methods
  }
  
  /** @Entity */
  class EntitySubClassOne extends MappedSuperclassBase
  {
      /** @Id @Column(type="integer") */
      private $id;
      /** @Column(type="string") */
      private $name;
  
      // ... more fields and methods
  }
  
  /** @Entity */
  class EntitySubClassTwo extends MappedSuperclassBase
  {
      /** @Id @Column(type="integer") */
      private $id;
      /** @Column(type="string") */
      private $name;
  
      // ... more fields and methods
  }
  </code></pre>