Skip to content

feat: Add support AddNestedMapper to QueryBuilder#319

Merged
alirezanet merged 1 commit intomasterfrom
QueryBuilderAddNesterMapper
Mar 7, 2026
Merged

feat: Add support AddNestedMapper to QueryBuilder#319
alirezanet merged 1 commit intomasterfrom
QueryBuilderAddNesterMapper

Conversation

@alirezanet
Copy link
Owner

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works
  • I have made corresponding changes to the documentation
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes

@what-the-diff
Copy link

what-the-diff bot commented Mar 7, 2026

PR Summary

  • Enhanced Query Builder Documentation and Functionality
    This PR includes the addition of a new method documentation for 'AddCompositeMap' to the 'IQueryBuilder' interface. It also includes the introduction of 'AddNestedMapper' methods to the 'IQueryBuilder' interface. These new methods allow reusing nested object mappings, merge nested mappings directly without a prefix, merge nested mappings with a custom prefix, and support custom mapper classes for nested object handling. The 'QueryBuilder' class has been updated to include the implementations of these new nested mapping functionalities.

  • Updates to Query Builder Documentation
    The 'queryBuilder.md' documentation has been updated to include detailed descriptions and usage examples for the new 'AddNestedMapper' and 'AddCompositeMap'. This enhances users' understanding of the functionality of these new methods and how best to utilize them.

  • New Test Class for Query Builder
    A new test class 'QueryBuilderNestedMapperTests' has been added to validate the nested mapping functionality in the 'QueryBuilder' class.

  • Implementation of Multiple Test Cases
    Multiple test cases have been implemented using the Xunit framework to cover multiple scenarios like adding nested mappers with or without prefixes, using custom mapper classes for nested mappings, lazy initialization of mappers, composite mappings for multiple nested mappers, correct behaviors for conditions, ordering, paging, and count retrieval. The tests also cover the override behavior of existing mappings when adding nested mappers and the interactions with compiled evaluators for building query results.

  • Helper Classes and Entities for Tests
    Several helper classes and entities like 'User', 'Address', 'Company', and 'Contact' have been included to facilitate the execution of the tests.

@alirezanet alirezanet changed the title feat: add AddNestedMapper to QueryBuilder feat: Add support AddNestedMapper to QueryBuilder Mar 7, 2026
@alirezanet alirezanet merged commit c58e3af into master Mar 7, 2026
5 checks passed
@alirezanet alirezanet deleted the QueryBuilderAddNesterMapper branch March 7, 2026 23:13
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