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

fixes for marshalling/unmarshalling issues #68

Closed kelaneren closed 11 years ago

kelaneren commented 11 years ago

These two are issues with aws sdk 1.5.1 and tested against 1.5.1 version. I don't know whether they are issues with 1.4.x or not.

  1. the batch get result issue. The json generated from BatchGetItemResultMarshaller.java doesn't match live dynamodb result format and caused wrong unmarshalling result.
  2. query result unmarshalling issue. This is a very weird issue. The json data format generated from QueryResultMarshaller.java is the same as the one from live dynamodb. However, the one has ConsumedCapacity in front of items. This difference caused sdk 1.5.1 wrongly deserializes ConsumedCapacity object into a invalid result item. It works after the sequence is changed in this fix. I didn't have time to dig more in sdk 1.5.1
mboudreau commented 11 years ago

Thanks for the fix! It will be included in the next version.