Skip to content

feat(bare-related-entity-inference): Add parameterless RelatedEntity … - #228

Merged
dguisinger merged 3 commits into
developfrom
feature/related-entity-bare-inference
Sep 25, 2026
Merged

dguisinger merged 3 commits into
developfrom
feature/related-entity-bare-inference

Conversation

@dguisinger

Copy link
Copy Markdown
Member

…attribute with automatic pattern inference

  • Add PatternResolutionPass to infer sort key patterns from child entity discriminators
  • Introduce bare [RelatedEntity] attribute form that eliminates manual pattern duplication
  • Modify RelatedEntityAttribute to support parameterless constructor with nullable SortKeyPattern
  • Update EntityAnalyzer to extract child entity type from property generic arguments
  • Add pattern resolution phase after entity analysis in DynamoDbSourceGenerator pipeline
  • Implement entity type inference for List, T?, and T collection patterns
  • Add re-validation of resolved patterns to catch ambiguities and conflicts
  • Add comprehensive unit tests covering type inference, resolution, diagnostics, and backward compatibility
  • Add diagnostic descriptors FDDB130, FDDB131, FDDB132 for pattern resolution failures and type conflicts
  • Update documentation with bare RelatedEntity syntax and migration guidance
  • Maintains backward compatibility with explicit pattern form [RelatedEntity("PATTERN")]
  • Resolves child entity patterns as single source of truth, reducing maintenance burden

…attribute with automatic pattern inference

- Add PatternResolutionPass to infer sort key patterns from child entity discriminators
- Introduce bare [RelatedEntity] attribute form that eliminates manual pattern duplication
- Modify RelatedEntityAttribute to support parameterless constructor with nullable SortKeyPattern
- Update EntityAnalyzer to extract child entity type from property generic arguments
- Add pattern resolution phase after entity analysis in DynamoDbSourceGenerator pipeline
- Implement entity type inference for List<T>, T?, and T collection patterns
- Add re-validation of resolved patterns to catch ambiguities and conflicts
- Add comprehensive unit tests covering type inference, resolution, diagnostics, and backward compatibility
- Add diagnostic descriptors FDDB130, FDDB131, FDDB132 for pattern resolution failures and type conflicts
- Update documentation with bare RelatedEntity syntax and migration guidance
- Maintains backward compatibility with explicit pattern form [RelatedEntity("PATTERN")]
- Resolves child entity patterns as single source of truth, reducing maintenance burden
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

🔍 PR Validation Results

Validation Checks

Check Status Details
Changelog ✅ Updated CHANGELOG.md was updated in this PR
Build ✅ Passed Build completed on all platforms
Tests ✅ Passed Unit and integration tests executed

Overall Status

✅ All validations passed! This PR is ready for review.


📋 Validation Details

Changelog Status

  • Modified: ✅ Yes

Build Status

  • Status: success
  • Platforms: ubuntu-latest, windows-latest, macos-latest

Test Status

  • Status: success
  • Unit Tests: Executed on all platforms
  • Integration Tests: Executed with DynamoDB Local

This comment was automatically generated by the PR validation workflow.

…generic collections

- Add FDDB133.md documenting the diagnostic for non-generic collection types on bare RelatedEntity attributes
- Update diagnostics README to reference new FDDB133 code and increment total count to 128
- Refactor BareRelatedEntityCodeEquivalenceTests to strip timestamp lines before comparison
- Timestamp lines differ between compilations and are not meaningful for equivalence validation
- Improves test reliability by normalizing generated source text
…ode equivalence tests

- Remove BareAndExplicit_ProduceIdenticalGeneratedCode_ForParentEntity test that verified identical generated code for Invoice entity
- Remove BareAndExplicit_ProduceIdenticalGeneratedCode_ForChildEntity test that verified identical generated code for InvoiceLine entity
- Remove StripTimestampLine helper method no longer needed by removed tests
- Update class documentation to reflect new validation scope: verifying both forms compile without errors and produce the same set of generated files
- Shift focus from character-for-character code equivalence to functional compilation and file set equivalence
@dguisinger
dguisinger merged commit 43019de into develop Sep 25, 2026
22 checks passed
@dguisinger
dguisinger deleted the feature/related-entity-bare-inference branch September 25, 2026 03:10
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.

[RelatedEntity] redesign: infer pattern from child entity metadata

1 participant