Skip to content

feat: Implement applyJoinRef and applyJoinRefs#80

Merged
chinhtrung merged 2 commits intomainfrom
trungnguyen.implementApplyJoinRefAndApplyJoinRefs
Dec 16, 2025
Merged

feat: Implement applyJoinRef and applyJoinRefs#80
chinhtrung merged 2 commits intomainfrom
trungnguyen.implementApplyJoinRefAndApplyJoinRefs

Conversation

@chinhtrung
Copy link
Contributor

Summary

  • Add applyJoinRef extension method for single join reference operations
  • Add applyJoinRefs extension methods for multiple join reference operations (2 and 3 references)
  • Add comprehensive tests demonstrating usage of the new extension methods
  • Improve ergonomics when working with multiple join references in a single operation

Changes

  • API: New extension methods in TypeSafeCriteriaBuilder:
    • applyJoinRef(ref, lambda) - for single reference operations
    • applyJoinRefs(ref1, ref2, lambda) - for 2 reference operations
    • applyJoinRefs(ref1, ref2, ref3, lambda) - for 3 reference operations
  • Tests: Added comprehensive test coverage demonstrating equivalence with existing applyFilter patterns

Benefits

  • Reduces boilerplate when working with multiple join references
  • Provides cleaner syntax for complex multi-table operations
  • Maintains type safety while improving readability

Test plan

  • New extension methods work correctly with existing join reference patterns
  • Tests demonstrate equivalence between new methods and existing applyFilter approach
  • All existing functionality continues to work unchanged
  • Tests cover both 2 and 3 reference scenarios using real entity relationships

Copy link
Member

@luanpotter luanpotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luanpotter
Copy link
Member

cc @QuinnB73

@chinhtrung chinhtrung merged commit f1b224c into main Dec 16, 2025
7 checks passed
@chinhtrung chinhtrung deleted the trungnguyen.implementApplyJoinRefAndApplyJoinRefs branch December 16, 2025 16:20
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.

2 participants