Skip to content

Support mutually recursive DynamoDB bean schemas - #7358

Open
afarber wants to merge 1 commit into
aws:masterfrom
afarber:6110-table-schema-from-bean-transitive-deps
Open

Support mutually recursive DynamoDB bean schemas#7358
afarber wants to merge 1 commit into
aws:masterfrom
afarber:6110-table-schema-from-bean-transitive-deps

Conversation

@afarber

@afarber afarber commented Sep 9, 2026

Copy link
Copy Markdown

Motivation and Context

Fixes #6110.

BeanTableSchema supported direct self-references, but lost its in-progress schema cache when constructing a different nested bean type. A mutually recursive bean relationship such as Parent -> Child -> Parent therefore recursed until stack overflow.

Modifications

  • Preserve the shared MetaTableSchemaCache when recursively creating nested bean schemas.
  • Add a regression test covering mutually recursive @DynamoDbBean classes and a finite map round-trip.
  • Correct the related internal comment.
  • Add a changelog entry.

Testing

./mvnw -pl :dynamodb-enhanced -am \
  -Dtest=BeanTableSchemaRecursiveTest \
  -Dsurefire.failIfNoSpecifiedTests=false \
  -Dspotbugs.skip \
  -Dcheckstyle.skip test

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

License

  • I confirm that this pull request can be released under the Apache 2 license

@afarber
afarber requested a review from a team as a code owner September 9, 2026 10:52
@afarber
afarber force-pushed the 6110-table-schema-from-bean-transitive-deps branch from c14dd0c to 01fd478 Compare September 9, 2026 10:58
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.

TableSchema.fromBean stack overflow if class hierarchy is transitively recursive

1 participant