title: Symfony API Platform entity inheritance
body: <p>My project uses doctrine2 Class Table Inheritance on entities and API Platform to provide API endpoint.</p>
  
  <pre class="lang-php prettyprint-override"><code>/**
   * @ORM\Entity(repositoryClass="App\Repository\PartyRepository")
   * @ORM\InheritanceType("JOINED")
   * @ORM\DiscriminatorColumn(name="discr", type="string")
   * @ORM\DiscriminatorMap({
   *      "org" = "Organization",
   *      "person" = "Person"
   * })
   * @ORM\HasLifecycleCallbacks()
   */
  abstract class Party {}
  
  /**
   * @ApiResource()
   * @ORM\Entity(repositoryClass="App\Repository\PersonRepository")
   * @ORM\InheritanceType("JOINED")
   * @ORM\DiscriminatorColumn(name="discr", type="string")
   * @ORM\DiscriminatorMap({
   *      "person" = "Person",
   *      "agent" = "Agent"
   * })
   * @ORM\HasLifecycleCallbacks()
   */
  class Person extends Party {}
  
  /**
   * @ApiResource()
   * @ORM\Entity(repositoryClass="App\Repository\AgentRepository")
   * @ORM\HasLifecycleCallbacks()
   */
  class Agent extends Person {
      private $affiliation;
  }
  </code></pre>
  
  <p>The problem is when looking at API platform model for <code>Person</code> it has all children properties like <code>Agent::$affiliation</code>.</p>
  
  <pre><code>Agent {
    affiliation string
    name string
      readOnly: true
  
    familyName string
    givenName string
    id string
      readOnly: true
  
    createdAt string($date-time)
    updatedAt string($date-time)
  }
  
  Person {
    name string
      readOnly: true
  
    familyName string
    givenName string
    id string
      readOnly: true
  
    createdAt string($date-time)
    updatedAt string($date-time)
    affiliation string
  }
  </code></pre>