From 380f4fbac7562572c0c72b8a38bcb834c955dc03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Radziwo=C5=84ski?= Date: Wed, 26 Sep 2012 14:27:16 +0200 Subject: [PATCH] Fixed unique-constraint name in XML Exporter --- lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php index 98f3d18cb..fe024df01 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php @@ -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'])); } }