From 100b8f3376a3a31af3d05ba6bd8cebd4fd6413eb Mon Sep 17 00:00:00 2001 From: kurund Date: Wed, 18 Dec 2013 13:42:10 -0800 Subject: [PATCH] minor fix for entity generation --- CRM/Core/CodeGen/EntitySpecification.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Core/CodeGen/EntitySpecification.php b/CRM/Core/CodeGen/EntitySpecification.php index 0d97b81e79..ab009fa086 100644 --- a/CRM/Core/CodeGen/EntitySpecification.php +++ b/CRM/Core/CodeGen/EntitySpecification.php @@ -277,10 +277,12 @@ class CRM_Core_CodeGen_EntitySpecification { if (!empty($table['index'])) { $uniqueElements = array(); foreach($table['index'] as $value) { - $indexElements[] = '@ORM\Index(name="' . $value['name'] . '", columns={"' . implode(',', $value['field']) . '"})'; if (isset($value['unique'])) { $uniqueElements[] = '@ORM\UniqueConstraint(name="' . $value['name'] . '", columns={"' . implode(',', $value['field']) . '"})'; } + else { + $indexElements[] = '@ORM\Index(name="' . $value['name'] . '", columns={"' . implode(',', $value['field']) . '"})'; + } } } -- 2.25.1