Skip to content

DynamoDB Enhanced Client: @DynamoDbIgnore fails in some property mapping scenarios #7328

Open

Description

@hiroki-otaka

Describe the bug

The DynamoDB Enhanced Client fails to recognize a valid setter when a bean has both getA() and isA() methods, even when isA() is annotated with @DynamoDbIgnore.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

a should be mapped using:

getA(): int
setA(int): void

and isA() should be ignored because of @DynamoDbIgnore.

Current Behavior

The setA(int) setter is not recognized, and the a attribute is not mapped correctly.

This appears to be caused by the interaction between JavaBeans property introspection and the two getters:

getA(): int
isA(): boolean

Even though isA() is annotated with @DynamoDbIgnore, it still affects property discovery.

Reproduction Steps

@DynamoDbBean
public class Foo {
    private int a;

    @DynamoDbAttribute("A")
    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }

    @DynamoDbIgnore
    public boolean isA() {
        return false;
    }
}

Possible Solution

No response

Additional Information/Context

The same class is mapped correctly by the AWS SDK for Java v1, which does not rely on the same JavaBeans property conventions as the v2 Enhanced Client.

AWS Java SDK version used

2.51.3

JDK version used

11.0.32.1

Operating System and version

Windows 11

Activity

  1. added
    bugThis issue is a bug.
    needs-triageThis issue or PR still needs to be triaged.
    on Aug 27, 2026
  2. added
    potential-regressionMarking this issue as a potential regression to be checked by team member
    and removed
    potential-regressionMarking this issue as a potential regression to be checked by team member
    on Aug 27, 2026
  3. debora-ito commented on Aug 27, 2026

    @debora-ito
    Member

    @hiroki-otaka thank you for reaching out. I can reproduce.

    Yes, it looks like the root cause is how the Java Beans Introspector handles conflict when two read methods of a property exist, it gives isA() priority over getA() but because it's for a boolean type it doesn't recognize setA(int) as the property writer.

    And I understand how this feels like a regression because the same class worked in v1 DynamoDB Mapper, but we don't classify differences between v1 and v2 as regressions. V2 is a new implementation, differences in behavior can happen and should be documented in the Dev Guide and Javadoc.

    Tracking this as a bug. Not ideal, but the workaround is to rename isA() to something that doesn't conflict with the property name.

  4. added
    needs-reviewThis issue or PR needs review from the team.
    and removed
    needs-triageThis issue or PR still needs to be triaged.
    potential-regressionMarking this issue as a potential regression to be checked by team member
    on Aug 27, 2026
  5. self-assigned this
    on Aug 27, 2026
  6. added
    p2This is a standard priority issue
    and removed
    needs-reviewThis issue or PR needs review from the team.
    on Aug 27, 2026
  7. removed their assignment
    on Aug 31, 2026
  8. IamPritamAcharya commented on Sep 8, 2026

    @IamPritamAcharya

    I reproduced this issue and opened #7356 with a fix and regression coverage for the conflicting getter case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.dynamodb-enhancedp2This is a standard priority issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions