Fix DynamoDB property converter precedence when a global converter is…#4323
Open
aanton-git wants to merge 7 commits intoaws:developmentfrom
Open
Fix DynamoDB property converter precedence when a global converter is…#4323aanton-git wants to merge 7 commits intoaws:developmentfrom
aanton-git wants to merge 7 commits intoaws:developmentfrom
Conversation
…ecific attributes are present, add unti tests
sdk/test/Services/DynamoDBv2/UnitTests/Custom/DocumentModel/PropertyStorageTests.cs
Outdated
Show resolved
Hide resolved
normj
requested changes
Mar 12, 2026
| "serviceName": "DynamoDBv2", | ||
| "type": "patch", | ||
| "changeLogMessages": [ | ||
| "Fix DynamoDB property converter precedence when a global converter is registered." |
Member
There was a problem hiding this comment.
There is the small possibility users possibly unintentionally depended on the current behavior. I think making the fix is the right choice but for transparency can you add [Breaking Change] as a prefix to the log message.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
There is a bug in the AWS .NET SDK’s DynamoDB object persistence model where property-specific converters (defined via the DynamoDBProperty(Converter = …) attribute) are ignored if a global converter is already registered in the DynamoDBContext.ConverterCache. The global converter takes precedence even when a property has its own converter defined, which is unexpected behavior and contrary to how attribute-based converters should work. ([https://github.com//issues/4036][1])
Motivation and Context
Current Behavior
When using:
the SDK always picks the global converter first, ignoring the more specific property converter. ([https://github.com/DynamoDB property attribute converter is ignored if global type converter is already registered #4036][1])
Expected Behavior
Property-specific converters should take precedence over globally registered converters. That is:
Testing
Breaking Changes Assessment
Screenshots (if appropriate)
Types of changes
Checklist
License