public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs)
    {
        /** @var ClassMetadata $classMetadata */
        $classMetadata = $eventArgs->getClassMetadata();

        if (null === $classMetadata->getReflectionClass() ||
            false == $this->isModular($classMetadata) ||
            'Harmony\Component\ModularRouting\StaticModule' == $this->getModuleClass() ||
            $classMetadata->hasField('module') || $classMetadata->hasAssociation('module')) {

            return;
        }

        $classMetadata->mapManyToOne([
            'targetEntity' => $this->getModuleClass(),
            'fieldName'    => 'module',
            'joinColumns'  => [
                [
                    'name'                 => 'module_id',
                    'referencedColumnName' => 'id',
                ],
            ],
        ]);
    }