Skip to content

issue #5039 - added support for fluent setters in dynamodb enhanced client #5856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

iulianbudau
Copy link
Contributor

@iulianbudau iulianbudau commented Feb 4, 2025

Adding support for Fluent Setters in the DynamoDBEnhancedClient #5039.

Description

Some consumers of DynamoDbMapper (v1) configured their bean classes with fluent setters. While this is working in v1, it is not supported in v2 as it was not considered in the original design. This feature aims to introduce support for Fluent Setters in the DynamoDBEnhancedClient.

Motivation and Context

The issue was raised in #5039. Adding support for fluent setters will help achieve feature parity between DynamoDbMapper (v1) and DynamoDBEnhancedClient (v2), making it easier for consumers to migrate to v2.

Modifications

The BeanInfo is now obtained using Introspector.getBeanInfo(beanClass), which identifies bean property descriptors based on regular setters and getters. The BeanTableSchema -> StaticTableSchema<T> createStaticTableSchema(Class<T> beanClass, MetaTableSchemaCache metaTableSchemaCache) logic has been updated to invoke a new method that enhances the descriptors to support fluent setters.

Testing

Unit tests added.

Screenshots (if appropriate)

Types of changes

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

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

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

@iulianbudau iulianbudau requested a review from a team as a code owner February 4, 2025 12:12
@iulianbudau iulianbudau force-pushed the feature/ddb-enhanced-add-support-for-fluent-setters branch from dfc6406 to 07a8b72 Compare February 24, 2025 10:14
Copy link
Contributor

@dagnir dagnir left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your contribution.

@dagnir dagnir enabled auto-merge February 25, 2025 17:31
Copy link

@dagnir dagnir added this pull request to the merge queue Feb 25, 2025
Merged via the queue into aws:master with commit fda10f1 Feb 25, 2025
9 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.

2 participants