From: kurund Date: Wed, 18 Dec 2013 21:42:10 +0000 (-0800) Subject: minor fix for entity generation X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=100b8f3376a3a31af3d05ba6bd8cebd4fd6413eb;p=civicrm-core.git minor fix for entity generation --- 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']) . '"})'; + } } }