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));
}