APIv4 - Fix dynamic bridge joins
authorColeman Watts <coleman@civicrm.org>
Thu, 10 Dec 2020 19:24:29 +0000 (14:24 -0500)
committerColeman Watts <coleman@civicrm.org>
Thu, 10 Dec 2020 19:29:29 +0000 (14:29 -0500)
commit17019d499ea63a9281d16c8c83a828e1c1a0071c
tree122d8ac882851c7562931a056798ca7b796d0099
parente3dfd4442cd65a963925e083c4c20f138069f1f6
APIv4 - Fix dynamic bridge joins

Move ON clause conditions to the first join when they reference the bridge entity itself
Ensure bridge joins work with joining the same table to itself (e.g. Contact to Contact via RelationshipCache)
CRM/Core/DAO/AllCoreTables.php
CRM/Core/Reference/Basic.php
CRM/Core/Reference/Dynamic.php
Civi/Api4/Query/Api4SelectQuery.php
ext/search/Civi/Search/Admin.php
tests/phpunit/api/v4/Action/FkJoinTest.php