1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Merge pull request #455 from radmar/master

Fixed unique-constraint name in XML Exporter
This commit is contained in:
Benjamin Eberlei 2012-10-05 11:23:55 -07:00
commit f7220ae416

View File

@ -109,9 +109,9 @@ class XmlExporter extends AbstractExporter
if (isset($metadata->table['uniqueConstraints'])) {
$uniqueConstraintsXml = $root->addChild('unique-constraints');
foreach ($metadata->table['uniqueConstraints'] as $unique) {
foreach ($metadata->table['uniqueConstraints'] as $name => $unique) {
$uniqueConstraintXml = $uniqueConstraintsXml->addChild('unique-constraint');
$uniqueConstraintXml->addAttribute('name', $unique['name']);
$uniqueConstraintXml->addAttribute('name', $name);
$uniqueConstraintXml->addAttribute('columns', implode(',', $unique['columns']));
}
}