APIv4 - Add fk_column to getFields metadata
authorcolemanw <coleman@civicrm.org>
Wed, 3 Jan 2024 14:15:00 +0000 (09:15 -0500)
committercolemanw <coleman@civicrm.org>
Thu, 4 Jan 2024 01:26:00 +0000 (20:26 -0500)
commit4b953f95e2a6d8e565bf224a2deb560bb7af7204
tree402ba79a75012457bc11af2d29d3bea2a4fecd0f
parent245369074295a186c92587e5378d57ea05c056f8
APIv4 - Add fk_column to getFields metadata

Before: getFields contained incomplete info about foreign keys, so trying to map the schema was unnecessarily difficult.

After: No need to use extra DAO methods like getReferenceColumns() to find out about FKs. All the info is returned by getFields.
Civi/Api4/Generic/DAOGetFieldsAction.php
Civi/Api4/Service/Spec/SpecFormatter.php
Civi/Schema/Traits/DataTypeSpecTrait.php
tests/phpunit/api/v4/Action/GetFieldsTest.php
tests/phpunit/api/v4/Custom/CustomEntityReferenceTest.php