lib/Doctrine/ORM/Mapping/ClassMetadata.php
public function getSingleIdentifierFieldName()
    {
        if ($this->isIdentifierComposite()) {
            throw MappingException::singleIdNotAllowedOnCompositePrimaryKey($this->className);
        }

        if (! isset($this->identifier[0])) {
            throw MappingException::noIdDefined($this->className);
        }

        return $this->identifier[0];
    }
public function getSingleIdentifierFieldName()
    {
        if ($this->isIdentifierComposite()) {
            throw MappingException::singleIdNotAllowedOnCompositePrimaryKey($this->className);
        }

        if (! isset($this->identifier[0])) {
            throw MappingException::noIdDefined($this->className);
        }

        return $this->identifier[0];
    }
public function getSingleIdentifierFieldName ( ) { if ( $ this -> isIdentifierComposite ( ) ) { throw MappingException :: singleIdNotAllowedOnCompositePrimaryKey ( $ this -> className ) ; } if ( ! isset ( $ this -> identifier [ 0 ] ) ) { throw MappingException :: noIdDefined ( $ this -> className ) ; } return $ this -> identifier [ 0 ] ; }
Gets the name of the single id field. Note that this only works on
entity classes that have a single-field pk.

@return string

@throws MappingException If the class has a composite primary key.
Gets the name of the single id field . Note that this only works on entity classes that have a single - field pk .