title: API Platform: associate many resources to a same entity
body: <p>I would like to create 2 different resources App\Resource\Category et App\Resource\Classification, which would be associated to a same entity  App\Entity\Classification. We have 2 different endpoints  v1/classifications and v2/categories. I would have liked that both ressources extend the same entity.</p>
  
  <p>Pseudo-code example:</p>
  
  <pre><code>&lt;?php
  // src/Entity/Classification.php
  namespace App\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Entity(repositoryClass="App\Repository\ClassificationRepository")
   */
  class Classification
  {
      /**
       * @ORM\Id
       * @ORM\GeneratedValue
       * @ORM\Column(type="integer")
       */
      private $id;
  
      /**
       * @ORM\Column(type="string", length=255)
       */
      private $code;
  
      /**
       * @ORM\Column(type="string", length=255)
       */
      private $label;
  
      /**
       * @ORM\OneToMany(targetEntity="App\Entity\ClassificationAttribute", mappedBy="classification")
       */
      private $classificationAttributes;
  
      public function __construct()
      {
          $this-&gt;classificationAttributes = new ArrayCollection();
      }
  
      public function getId()
      {
          return $this-&gt;id;
      }
  
      // ... getter and setter methods
  }
  </code></pre>
  
  <pre><code>&lt;?php
  // src/Resource/Classification.php
  namespace App\Resource;
  
  use ApiPlatform\Core\Annotation\ApiResource;
  use App\Entity\Classification as ClassificationEntity;
  
  /**
   * ...
   * @ApiResource(
   *     collectionOperations={"get"},
   *     itemOperations={"get"}
   * )
   */
  class Classification extends ClassificationEntity
  {
      // ...
  }
  </code></pre>
  
  <pre><code>&lt;?php
  // src/Resource/Category.php
  namespace App\Resource;
  
  use ApiPlatform\Core\Annotation\ApiResource;
  use App\Entity\Classification as ClassificationEntity;
  
  /**
   * ...
   * @ApiResource(
   *     collectionOperations={"get"},
   *     itemOperations={"get"}
   * )
   */
  class Category extends ClassificationEntity
  {
      // ...
  }
  </code></pre>
  
  <p>and each resource would have its endpoint, its serializer, its normaliser, etc, etc, ... To summarize, each resource would be customized its own way.</p>
  
  <p>Except there is no possibility to use annotations et inheritance at the same time: annotations of the extended entity are not used.</p>
  
  <p>I could associate a distinct DataProvider to each resource, and plug these DataProviders on the repository. But doing that, I lose every native fonctionality of the Doctrine ORM Extension and have to reimplement every one I use (an example among many: @ApiFilter)</p>
  
  <p>Is there a simpler way to associate many resources to a same entity?</p>
  
  <p>Thank you for your help.</p>