Domain/DomainUtil.php
public static function getIdentifierName(ObjectManager $om, $className)
    {
        $meta = $om->getClassMetadata($className);
        $ids = $meta->getIdentifier();

        return implode('', $ids);
    }
public static function getIdentifierName(ObjectManager $om, $className)
    {
        $meta = $om->getClassMetadata($className);
        $ids = $meta->getIdentifier();

        return implode('', $ids);
    }
public static function getIdentifierName ( ObjectManager $ om , $ className ) { $ meta = $ om -> getClassMetadata ( $ className ) ; $ ids = $ meta -> getIdentifier ( ) ; return implode ( '' , $ ids ) ; }
Get the name of identifier.

@param ObjectManager $om        The doctrine object manager
@param string        $className The class name

@return string
Get the name of identifier .