[DDC-1798] Exporter generate error when composite primary key is generated. Fixes GH-342
This commit is contained in:
parent
47ac61b3e0
commit
04b23dbf10
@ -92,7 +92,7 @@ class PhpExporter extends AbstractExporter
|
||||
$lines[] = '$metadata->mapField(' . $this->_varExport($fieldMapping) . ');';
|
||||
}
|
||||
|
||||
if ($generatorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
|
||||
if ( ! $metadata->isIdentifierComposite && $generatorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
|
||||
$lines[] = '$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_' . $generatorType . ');';
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ class XmlExporter extends AbstractExporter
|
||||
}
|
||||
}
|
||||
|
||||
if ($idGeneratorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
|
||||
if ( ! $metadata->isIdentifierComposite && $idGeneratorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
|
||||
$id[$metadata->getSingleIdentifierFieldName()]['generator']['strategy'] = $idGeneratorType;
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ class YamlExporter extends AbstractExporter
|
||||
$fieldMappings[$name] = $fieldMapping;
|
||||
}
|
||||
|
||||
if ($idGeneratorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
|
||||
if ( ! $metadata->isIdentifierComposite && $idGeneratorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
|
||||
$ids[$metadata->getSingleIdentifierFieldName()]['generator']['strategy'] = $idGeneratorType;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user