Skip to content

Commit a8d55a8

Browse files
committed
Support AutoGeneratedTimestamp and UpdateBehavior annotation in nested objects
1 parent f4bc698 commit a8d55a8

File tree

3 files changed

+559
-27
lines changed

3 files changed

+559
-27
lines changed

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/internal/extensions/utility/NestedRecordUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ public static TableSchema<?> getTableSchemaForListElement(TableSchema<?> rootSch
7171
}
7272
}
7373
String attributeName = parts[parts.length - 1];
74-
listElementSchema = TableSchema.fromClass(
75-
Class.forName(currentSchema.converterForAttribute(attributeName)
76-
.type().rawClassParameters().get(0).rawClass().getName()));
74+
Optional<? extends TableSchema<?>> nestedListSchema = getNestedSchema(currentSchema, attributeName);
75+
listElementSchema = nestedListSchema
76+
.orElseThrow(() -> new IllegalArgumentException("Unable to resolve schema for list element at: " + key));
7777
}
7878
} catch (ClassNotFoundException e) {
7979
throw new IllegalArgumentException("Class not found for field name: " + key, e);

0 commit comments

Comments
 (0)