Doctrine\ODM\PHPCR\Mapping\ClassMetadata::setIdentifier PHP Method

setIdentifier() public method

INTERNAL: Sets the mapped identifier field of this class.
public setIdentifier ( string $identifier )
$identifier string
    public function setIdentifier($identifier)
    {
        if ($this->identifier && $this->identifier !== $identifier) {
            throw new MappingException('Cannot map the identifier to more than one property');
        }
        $this->identifier = $identifier;
    }
ClassMetadata