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

determineIdStrategy() private method

Determine the id strategy for this document. Only call this if no explicit strategy was assigned.
private determineIdStrategy ( )
    private function determineIdStrategy()
    {
        if ($this->parentMapping && $this->nodename) {
            $this->setIdGenerator(self::GENERATOR_TYPE_PARENT);
            return;
        }
        if ($this->parentMapping) {
            $this->setIdGenerator(self::GENERATOR_TYPE_AUTO);
            return;
        }
        if ($this->getIdentifier()) {
            $this->setIdGenerator(self::GENERATOR_TYPE_ASSIGNED);
            return;
        }
        throw new MappingException(sprintf('No id generator could be determined in "%s". Either map a parent and a nodename field and add values to them, or map the id field and configure a mapping strategy', $this->name));
    }
ClassMetadata