Skip to content
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

Improved explanation for DynamoDB IgnoreNullsMode #5668

Open
chrylis opened this issue Oct 17, 2024 · 0 comments
Open

Improved explanation for DynamoDB IgnoreNullsMode #5668

chrylis opened this issue Oct 17, 2024 · 0 comments
Labels
documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.

Comments

@chrylis
Copy link

chrylis commented Oct 17, 2024

Describe the issue

In a recent update, the boolean Update property ignoreNulls was deprecated in favor of ignoreNullsMode, which takes a strategy. However, I was unable to understand from the documentation what the various options do; it seems to be written from the perspective of someone already familiar with the internals of the framework. In particular, it's not clear to me which values correspond to existing code of ignoreNulls(true) or ignoreNulls(false).

Specific items:

  1. Mapping instructions for converting existing ignoreNulls to IgnoreNullsMode values would be helpful, as would a "replaced by" in the Javadoc.
  2. In SCALAR_ONLY, the phrasing "if done so" is unclear.
  3. SCALAR_ONLY says that updates to nested attributes are supported but not maps; it's unclear whether this means that a nested Java object is supported (since it would be represented as a map in DynamoDB). Does the SDK distinguish between com.example.MyNestedObject and java.util.Map?
  4. MAPS_ONLY says that updating scalar values is supported—overwriting existing values in the table. But this behavior doesn't seem to relate to nulls, if the user is providing something. Or is this saying that the scalar nulls will overwrite the stored attributes?
  5. DEFAULT says it disables "special handling" but not what the default rules are—does DEFAULT mean that nulls (for an attempted partial update) on the entity object will cause nulls to overwrite the database record? Or does it mean the opposite?

Links

https://sdk.amazonaws.com/java/api/2.28.24/software/amazon/awssdk/enhanced/dynamodb/model/IgnoreNullsMode.html

@chrylis chrylis added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant