code: private function configureTaxableMapping(LoadClassMetadataEventArgs $eventArgs)
      {
          /** @var ClassMetadata $metadata */
          $metadata = $eventArgs->getClassMetadata();
          $class = $metadata->getName();
  
          // Check class
          if (!is_subclass_of($class, Pricing\Model\TaxableInterface::class)) {
              return;
          }
  
          // Don't add twice
          if (in_array($class, $this->taxableClassCache)) {
              return;
          }
  
          if (!$metadata->hasAssociation('taxGroup')) {
              $metadata->mapManyToOne([
                  'fieldName'    => 'taxGroup',
                  'targetEntity' => Pricing\Entity\TaxGroup::class,
                  'joinColumns'  => [
                      [
                          'name'                 => 'tax_group_id',
                          'referencedColumnName' => 'id',
                          'onDelete'             => 'RESTRICT',
                          'nullable'             => true,
                      ],
                  ],
              ]);
          }
  
          // Cache class
          $this->taxableClassCache[] = $class;
      }
docs: Configures the taxable mapping.
  
  @param LoadClassMetadataEventArgs $eventArgs