From ef4e73f9877535e1af08800e180e3ec6b7e30fa0 Mon Sep 17 00:00:00 2001 From: Menno Holtkamp Date: Thu, 20 Mar 2014 11:08:29 +0100 Subject: [PATCH] Use boolean values for 'unique' attribute As defined in: https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd#L294 Same as 'nullable' attribute. It was being exported as a "1" for TRUE and "0" for false --- lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php index 9a7893eb7..f69eaec59 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php @@ -193,7 +193,7 @@ class XmlExporter extends AbstractExporter } if (isset($field['unique']) && $field['unique']) { - $fieldXml->addAttribute('unique', $field['unique']); + $fieldXml->addAttribute('unique', $field['unique'] ? 'true' : 'false'); } if (isset($field['options'])) {