private function findIdentityField(string $className): void
    {
        $this->metadata = $this->entityManager->getClassMetadata($className);
        foreach ($this->metadata->fieldMappings as $meta) {
            if ($meta['id'] ?? false) {
                $this->identityField = $meta['fieldName'];
            }
        }
    }
private function findIdentityField(string $className): void
    {
        $this->metadata = $this->entityManager->getClassMetadata($className);
        foreach ($this->metadata->fieldMappings as $meta) {
            if ($meta['id'] ?? false) {
                $this->identityField = $meta['fieldName'];
            }
        }
    }
private function findIdentityField ( string $ className ) : void { $ this -> metadata = $ this -> entityManager -> getClassMetadata ( $ className ) ; foreach ( $ this -> metadata -> fieldMappings as $ meta ) { if ( $ meta [ 'id' ] ?? false ) { $ this -> identityField = $ meta [ 'fieldName' ] ; } } }
Look up which field is the ID

@param string $className
Look up which field is the ID