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
        ));
    }
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
        ));
    }
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 ) ) ; }
Determine the id strategy for this document. Only call this if no explicit
strategy was assigned.

@throws MappingException if no strategy is applicable with the mapped fields.
Determine the id strategy for this document . Only call this if no explicit strategy was assigned .