Skip to content

Feature/follow all exposed joins in input record filter step#6

Merged
darinkelkhoff merged 6 commits intodevelopfrom
feature/follow-all-exposed-joins-in-input-record-filter-step
Mar 24, 2026
Merged

Feature/follow all exposed joins in input record filter step#6
darinkelkhoff merged 6 commits intodevelopfrom
feature/follow-all-exposed-joins-in-input-record-filter-step

Conversation

@darinkelkhoff
Copy link
Copy Markdown
Contributor

@darinkelkhoff darinkelkhoff commented Feb 16, 2026

Summary

Improves InputRecordFilterStep to correctly handle filters referencing fields across multi-hop joins (including one-to-many and many-to-one relationships) by properly sorting and traversing join paths from the main table outward.

  • Extracts joined-record caching and lookup logic into a new reusable class RecordWorkflowContextJoinedRecordHelper that application-defined workflow types can use for their own filter steps
  • Adds sortQueryJoinsFromMainTableOutward (adapted from AbstractRDBMSAction) to ensure joins are processed in the correct order when building the cross-product
  • Updates buildCrossProduct to be static and take the helper object, making it callable from RecordWorkflowTypeTester and custom workflows
  • Adds a reset() method to the helper so cached join records can be cleared after workflow execution (when records may have been persisted)
  • Comprehensive test coverage via InputRecordFilterStepTest exercising 1:1, 1:N, N:1, and multi-hop join combinations

Chore commits

  • Updates qqq-backend-core to a tagged branch build that includes the flipped-join validation fix
  • Updates qbit-build-parent to 1.5.1 (Java 21)
  • Updates CircleCI orb to kingsrook/qqq-orb@0.6

Test plan

  • Filters on 1:1 joins match/reject correctly
  • Filters on N:1 joins match/reject correctly
  • Filters on 1:N joins match/reject correctly
  • Filters on multi-hop paths (N:1→N:1, 1:N→1:1, 1:N→N:1, N:1→1:N, 1:N→1:N, 1:N→N:1→1:1) match/reject correctly
  • Missing FK values or empty join sets result in no match (no NPE)
  • RecordWorkflowTypeTester.doesFilterMatch works post-execution after reset() clears stale cache

🤖 Generated with Claude Code

… exposed join on a table, including relationships including 'many's.

Also expose a class, RecordWorkflowContextJoinedRecordHelper, that application-defined workflow types can use to make their filter steps work the same way.

Add large test on InputRecordFilterStep - that tries to do as many versions of 1-n, n-1, n-1-n, 1-n-1, etc, that my friend claude and i could come up with - along with a CompanyHierarchyTablesAndJoinsMetaDataProducer that defines a nice complex set of tables & joins.
@darinkelkhoff darinkelkhoff changed the base branch from main to develop February 16, 2026 22:24
@darinkelkhoff darinkelkhoff marked this pull request as ready for review February 17, 2026 02:34
@darinkelkhoff darinkelkhoff merged commit 80a6326 into develop Mar 24, 2026
4 checks 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.

1 participant