-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APIv4 - Use subquery to LEFT JOIN via a bridge entity #19825
Conversation
(Standard links)
|
06381b2
to
9a12b0d
Compare
@colemanw so I shouldn't test this until you have added another commit? |
I just pushed up a new feature into this PR where you can select "Without" as a join type in SearchKit. I'll add another commit soon with a test and an upgrade script, but feel free to do an |
Bridge entities are supposed to be transparent in APIv4, but when LEFT joining, an artifact of the double-join would give extraneous results.
3357a25
to
92cb17f
Compare
…ot have a relationship to another entity
92cb17f
to
266e8de
Compare
So my upgrade test passed this time
After
One thing I would note is we should probably make extension upgrades visible to run from the civicrm/upgrade screen or run automatically as I rather failed to spot that I needed a separate process MOP |
Overview
Per https://lab.civicrm.org/dev/core/-/issues/2438
Fixes the ability to do "Without" conditions in SearchKit when a bridge table is used (e.g. EntityTag or RelationshipCache).
Before
Bridge entities are supposed to be transparent in APIv4, but when LEFT joining, an artifact of the double-join would give extraneous results.
After
Uses a subquery to achieve a single LEFT JOIN making the bridge table invisible to the api user.