Skip to content

Commit 1271836

Browse files
committed
update attribute type detection in DynamoDB data access object
1 parent 6cb3b67 commit 1271836

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

shared-code/src/data-access-layer/data-access-objects/data-access-object-dynamodb.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,9 @@ export class DataAccessObjectDynamoDB extends BasicDataAccessObject implements I
607607
items.forEach((item) => {
608608
Object.keys(item).forEach((key) => {
609609
if (!attributeTypes[key]) {
610-
attributeTypes[key] = typeof item[key];
610+
const attributeValue = item[key];
611+
const attributeType = Object.keys(attributeValue)[0];
612+
attributeTypes[key] = attributeType;
611613
}
612614
});
613615
});

0 commit comments

Comments
 (0)