mboudreau / Alternator

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

Closed James-Richardson closed 10 years ago

James-Richardson commented 10 years ago

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"]}.

mboudreau commented 10 years ago

Shoot, sorry for taking so long with this merge. There's something else I want to get in before I do a release. Cheers.