diff --git a/CRM/Core/CodeGen/Specification.php b/CRM/Core/CodeGen/Specification.php index 4d476550a432..f2300887972b 100644 --- a/CRM/Core/CodeGen/Specification.php +++ b/CRM/Core/CodeGen/Specification.php @@ -514,7 +514,7 @@ public function getPrimaryKey(&$primaryXML, &$fields, &$table) { if (isset($fields[$name])) { $fields[$name]['autoincrement'] = $auto; } - $fields[$name]['autoincrement'] = $auto; + $primaryKey = [ 'name' => $name, 'autoincrement' => $auto,