I defined the following table in Scala. When I ran a test to query data from the dynamodb table, it throws exceptions:
com.amazonaws.services.dynamodbv2.datamodeling. DynamoDBMappingException
: TsuIntersectionRecord[comments]; could not unconvert attribute
The problem is with comments attribute, which is a list (SS). What should I do to fix unconert problem?
@DynamoDBTable(tableName = "tsu-overrides-table")
case class TsuIntersectionRecord(
@(DynamoDBHashKey @beanGetter)(attributeName = "overrideId")
@BeanProperty
var overrideId: String,
@(DynamoDBRangeKey @beanGetter)(attributeName = "intersection")
@BeanProperty
var intersection: String,
@(DynamoDBAttribute @beanGetter)(attributeName = "runId")
@BeanProperty
var runId: String,
@(DynamoDBAttribute @beanGetter)(attributeName = "snapshotDate")
@BeanProperty
var snapshotDate: String,
@(DynamoDBAttribute @beanGetter)(attributeName = "tsuValue")
@BeanProperty
var tsuValue: Double,
@(DynamoDBAttribute @beanGetter)(attributeName = "action")
@BeanProperty
var action: String,
@(DynamoDBAttribute @beanGetter)(attributeName = "overrideValue")
@BeanProperty
var overrideValue: Option[Double],
@(DynamoDBAttribute @beanGetter)(attributeName = "comments")
@BeanProperty
var comments: List[String],
@(DynamoDBAttribute @beanGetter)(attributeName = "lastUpdateTime")
@BeanProperty
var lastUpdateTime: Int
) {
def this() = this(null, null, null, null, 0.0, null, None, List(), 0)
}