Skip to content

Commit

Permalink
Merge pull request #455 from radmar/master
Browse files Browse the repository at this point in the history
Fixed unique-constraint name in XML Exporter
  • Loading branch information
beberlei committed Oct 5, 2012
2 parents 44c0ca4 + 380f4fb commit f7220ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
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']));
}
}
Expand Down

0 comments on commit f7220ae

Please sign in to comment.