1
0
mirror of synced 2025-01-18 14:31:40 +03:00

Set association-key attribute in xml mapping

This commit is contained in:
Asmir Mustafic 2011-10-18 15:48:56 +02:00
parent 0b1f6e3539
commit 0d57ffbc3b

View File

@ -139,6 +139,9 @@ class XmlExporter extends AbstractExporter
if (isset($field['columnName'])) {
$idXml->addAttribute('column', $field['columnName']);
}
if (isset($field['associationKey']) && $field['associationKey']) {
$idXml->addAttribute('association-key', 'true');
}
if ($idGeneratorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
$generatorXml = $idXml->addChild('generator');
$generatorXml->addAttribute('strategy', $idGeneratorType);