Only the required attributes will be returned when using the @Query annotation and all the rest will be nulls, ie:
HashMap<String, AttributeValue> key = new HashMap<>();
key.put("id", new AttributeValue(hitId));
GetItemRequest request = new GetItemRequest()
.withKey(key)
.withTableName("tablename")
.withProjectionExpression("username");
GetItemResult item = db.getItem(request);
Actual Behavior
All the attributes are returned
Steps to Reproduce the Problem
create findById (partition key) method
check the returned object
Specifications
Spring Data DynamoDB Version: 5.0.4 (2.0)
Spring Data Version: 2.0.9.RELEASE
AWS SDK Version: 1.11.390
Java Version: 1.8.0_20 - Java HotSpot(TM) 64-Bit Server VM 25.20-b23
Platform Details: Windows 8.1 6.3
Expected Behavior
Only the required attributes will be returned when using the @Query annotation and all the rest will be nulls, ie:
Actual Behavior
All the attributes are returned
Steps to Reproduce the Problem
Specifications
Spring Data DynamoDB Version: 5.0.4 (2.0) Spring Data Version: 2.0.9.RELEASE AWS SDK Version: 1.11.390 Java Version: 1.8.0_20 - Java HotSpot(TM) 64-Bit Server VM 25.20-b23 Platform Details: Windows 8.1 6.3