You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finding that enums are not mapped when part of a nested DynamoDBDocument.
Steps to Reproduce the Problem
@DynamoDBTable(tableName = "Orders")
public class Order {
//hash key
// range key
// attributes
@DynamoDBAttribute(attributeName = "OrderData")
private OrderData orderData;
}
@DynamoDBDocument
public class OrderData {
@DynamoDBAttribute(attributeName = "customer")
private Customer customer;
@DynamoDBAttribute(attributeName = "Source")
@DynamoDBTypeConverted(converter = OrderChannel.OrderChannelEnumConverter.class)
private OrderChannel source;
}
@DynamoDBDocument
public class Customer {
@DynamoDBAttribute(attributeName = "customerType")
@DynamoDBTypeConverted(converter = CustomerType.CustomerTypeConvertor)
private CustomerType customerType;
}
The source attribute above persists perfectly. However the CustomerType does not.
Any enum that is more than 1 level deep in the DynamoDBDocument i.e in sub documents does not get converted into a string. It comes up as type B i.e. byte buffer.
The custom convertors mentioned above don't do anything clever apart from convert between enum to string and vice versa.
Specifications
Spring Data DynamoDB Version: 5.1.0 (2.1)
Spring Data Version: 2.1.10.RELEASE
AWS SDK Version: 1.11.415
Java Version: 1.8.0_192 - OpenJDK 64-Bit Server VM 25.192-b01
Platform Details: Mac OS X 10.14.6
The text was updated successfully, but these errors were encountered:
Expected Behavior
Enums are mapped consistently
Actual Behavior
Finding that enums are not mapped when part of a nested DynamoDBDocument.
Steps to Reproduce the Problem
The source attribute above persists perfectly. However the CustomerType does not.
Any enum that is more than 1 level deep in the DynamoDBDocument i.e in sub documents does not get converted into a string. It comes up as type B i.e. byte buffer.
The custom convertors mentioned above don't do anything clever apart from convert between enum to string and vice versa.
Specifications
The text was updated successfully, but these errors were encountered: