Skip to content

Persist-only property support for DynamoDB Enhanced client #3913

Open
@chrylis

Description

@chrylis

Describe the feature

The Enhanced client should identify JavaBeans properties based on getter methods. When a setter method is not present, the client should persist the property into DynamoDB but should not attempt to set the property on read. (If necessary, an explicit directive to do this such as Jackson's @JsonProperty(access) would be okay.)

Use Case

I have a table with a large number of derived properties for indexing. Currently, the Enhanced client fails to correctly identify properties that have only getter methods and not setter methods. As the use of derived properties to paste together main properties is the standard method of creating indexes for DDB, it would be helpful not to have to include dummy setters.

Proposed Solution

Modify BeanTableSchema#isMappableProperty not to exclude properties without setters, and allow missing setters to be interpreted as "no-op".

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2.19.25

JDK version used

openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

Operating System and version

Gentoo Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    dynamodb-enhancedfeature-requestA feature should be added or improved.p3This is a minor priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions