src/Entity/Traits/ImplementNotifyChangeTrackingPolicy.php
public function ensureMetaDataIsSet(EntityManagerInterface $entityManager): void
    {
        self::getDoctrineStaticMeta()->setMetaData($entityManager->getClassMetadata(self::class));
    }
public function ensureMetaDataIsSet(EntityManagerInterface $entityManager): void
    {
        self::getDoctrineStaticMeta()->setMetaData($entityManager->getClassMetadata(self::class));
    }
public function ensureMetaDataIsSet ( EntityManagerInterface $ entityManager ) : void { self :: getDoctrineStaticMeta ( ) -> setMetaData ( $ entityManager -> getClassMetadata ( self :: class ) ) ; }
The meta data is set to the entity when the meta data is loaded, however if metadata is cached that wont happen
This call ensures that the meta data is set

@param EntityManagerInterface $entityManager
The meta data is set to the entity when the meta data is loaded however if metadata is cached that wont happen This call ensures that the meta data is set