A mock DynamoDB that runs locally for testing purposes - DEPRECATED, PLEASE USE DYNAMODB LOCAL: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html
Apache License 2.0
78
stars
39
forks
source link
Fixing querying items containing set attributes #82
Using Alternator, I found that when querying items, some attributes were unexpectedly coming back as null, or even getting assigned the values of another attribute.
I suspected the problem was caused by the use of set attributes (SS and NS). Looking at the Alternator source, I saw that there were no tests involving set attributes.
I eventually tracked the bug down to the JSON returned by QueryResultMarshaller. For sets, the JSON looked like this: {"SS":"str1,str2"}. The fix to QueryResultMarshaller corrects this to this: {"SS":["str1","str2"]}.
Using Alternator, I found that when querying items, some attributes were unexpectedly coming back as null, or even getting assigned the values of another attribute.
I suspected the problem was caused by the use of set attributes (SS and NS). Looking at the Alternator source, I saw that there were no tests involving set attributes.
I eventually tracked the bug down to the JSON returned by QueryResultMarshaller. For sets, the JSON looked like this: {"SS":"str1,str2"}. The fix to QueryResultMarshaller corrects this to this: {"SS":["str1","str2"]}.