public function getNewMaxId($entityClassname): int
    {
        $maxId = $this->em->createQueryBuilder()
            ->select('MAX(e.id) + 1')
            ->from($entityClassname, 'e')
            ->getQuery()
            ->getSingleScalarResult();
        return (int) $maxId;
    }
public function getNewMaxId($entityClassname): int
    {
        $maxId = $this->em->createQueryBuilder()
            ->select('MAX(e.id) + 1')
            ->from($entityClassname, 'e')
            ->getQuery()
            ->getSingleScalarResult();
        return (int) $maxId;
    }
public function getNewMaxId ( $ entityClassname ) : int { $ maxId = $ this -> em -> createQueryBuilder ( ) -> select ( 'MAX(e.id) + 1' ) -> from ( $ entityClassname , 'e' ) -> getQuery ( ) -> getSingleScalarResult ( ) ; return ( int ) $ maxId ; }
Returns new MAX ID for entity
@param string $entityClassname
@return int
Returns new MAX ID for entity