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
You can flatten only one map present on a record, otherwise it will be thrown an exception
713
+
>**Constraints**
714
+
>-A record can contain at most one `@DynamoDbFlattenMap`. This limit applies across the entire classhierarchy, including any composed or flattened classes.
715
+
> - The flattened map must use `String` as both the key and value type (`Map<String, String>`).
716
+
> - Attribute names generated from map keys must not conflict with existing attributes on the record. If a conflict is detected, an exception will be thrown.
717
+
> - If more than one flattened map is present, an exception will be thrown during schema creation.
718
+
714
719
715
720
Flat map composite classes using StaticTableSchema:
716
721
@@ -732,6 +737,6 @@ private static final StaticTableSchema<Customer> CUSTOMER_TABLE_SCHEMA =
732
737
.setter(Customer::setName))
733
738
// Because we are flattening a Map object, we supply a getter and setter so the
Copy file name to clipboardExpand all lines: services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/mapper/StaticImmutableTableSchema.java
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -178,7 +178,7 @@ private B mapToItem(B thisBuilder,
Copy file name to clipboardExpand all lines: services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/enhanced/dynamodb/functionaltests/FlattenMapTest.java
0 commit comments