Fix support for composite primary keys
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 24 Jun 2021 03:24:46 +0000 (15:24 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 24 Jun 2021 03:24:49 +0000 (15:24 +1200)
commit179eeacb16e4f2b8ace1b3c75c3164e9f0039c43
tree6f8c33096dcc417b6db4550eb2c17159e343886e
parente7d0663ed7878cf6cbef68ebacbc95e295279d51
Fix support for composite primary keys

Fixes what looks like an oversight
https://github.com/civicrm/civicrm-core/commit/022785d8d5d4876aa1211b7adc0d7c31e2995fc5#diff-08ba0d294c1f2e5b9d42e4768aa3b30a10e5128809c590f155c5ac0cc9b2f69cL480-L481

An 'if' was added but the uncondition line left in

The result is that if a composite primary field IS defined
per below an entry for it is incorrectly added to the field
array with just autoincrement set.
`
    <primaryKey>
        <name>contact_timestamp_type</name>
        <field>contact_identifier</field>
        <field>recipient_action_datetime</field>
        <field>event_type</field>
    </primaryKey>
`
CRM/Core/CodeGen/Specification.php