Skip to content
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

Filter join conditions #2198 #2206

Merged
merged 3 commits into from
Nov 19, 2024
Merged

Conversation

zahardev
Copy link
Contributor

@zahardev zahardev commented Nov 13, 2024

Adds a filter for join conditions. Most immediately, this is required for https://github.com/GravityKit/Multiple-Forms/pull/105.

💾 Build file (7538931).

@mrcasual
Copy link
Collaborator

mrcasual commented Nov 13, 2024

@zahardev, thanks for the fixes. Please fix the merge conflict and then hit that "merge" button.

On a related note, now that we have fixed https://github.com/GravityKit/Multiple-Forms/issues/103, does it make sense to keep the following?

// Filter to active entries only
$status_conditions = \GF_Query_Condition::_or(
new \GF_Query_Condition(
new \GF_Query_Column( 'status', $join->join_on->ID ),
\GF_Query_Condition::EQ,
new \GF_Query_Literal( 'active' )
),
new \GF_Query_Condition(
new \GF_Query_Column( 'status', $join->join_on->ID ),
\GF_Query_Condition::IS,
\GF_Query_Condition::NULL
)
);
$q = $query->_introspect();
$query->where( \GF_Query_Condition::_and( $q['where'], $status_conditions ) );

@rafaehlers
Copy link
Contributor

@zahardev
Copy link
Contributor Author

@mrcasual

Yes, we need that part for the strict Strict Entry Match view.

@zahardev zahardev merged commit 2919a94 into develop Nov 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants