dev/core#2271 - APIv4 - Smarter check for adding default ON clause to explicit joins
authorColeman Watts <coleman@civicrm.org>
Thu, 24 Dec 2020 03:04:39 +0000 (22:04 -0500)
committerColeman Watts <coleman@civicrm.org>
Thu, 24 Dec 2020 13:00:37 +0000 (08:00 -0500)
commita5d7af60bf71a9f9171b40a3ef754e2c7e79a4bc
tree6a35d7b39bb5e005ed41d9ae4268e9c0a739daa1
parentb2b9e8cee772ffc5be91db6a67c430aeaacee74e
dev/core#2271 - APIv4 - Smarter check for adding default ON clause to explicit joins

When adding explicit joins in APIv4, the API will automacially add an ON clause linking it
to the base entity unless it detects some other link already present in the ON clause supplied.
Previously it would determine this by checking for the join entity ID;
now it looks for the join entity ID OR any other field in the join entity with an FK.
This gives more leeway for people to add creative joins without the defaults getting in the way.
Civi/Api4/Query/Api4SelectQuery.php