我正在使用 dynamodb Local。我正在尝试将两个地址分配给一个人,但出现“重复密钥”错误。我想为一个人添加更多国家和更多地址。但是每当我尝试为该人添加另一个国家和地址时,它都会出现重复密钥错误
有人可以帮我吗?帮助表示赞赏。 我的本地主机代码的图像
{
"AttributeDefinitions": [
{
"AttributeName": "AddressID",
"AttributeType": "S"
},
{
"AttributeName": "CustomerID",
"AttributeType": "S"
},
{
"AttributeName": "Country",
"AttributeType": "S"
}
],
"TableName": "Addresses",
"KeySchema": [
{
"AttributeName": "AddressID",
"KeyType": "HASH"
},
{
"AttributeName": "CustomerID",
"KeyType": "RANGE"
}
],
"TableStatus": "ACTIVE",
"CreationDateTime": "2021-04-06T09:06:29.622Z",
"ProvisionedThroughput": {
"LastIncreaseDateTime": "1970-01-01T00:00:00.000Z",
"LastDecreaseDateTime": "1970-01-01T00:00:00.000Z",
"NumberOfDecreasesToday": 0,
"ReadCapacityUnits": 5,
"WriteCapacityUnits": 5
},
"TableSizeBytes": 732,
"ItemCount": 6,
"TableArn": "arn:aws:dynamodb:ddblocal:000000000000:table/Addresses",
"GlobalSecondaryIndexes": [
{
"IndexName": "UserIndex",
"KeySchema": [
{
"AttributeName": "AddressID",
"KeyType": "HASH"
},
{
"AttributeName": "Country",
"KeyType": "RANGE"
}
],
"Projection": {
"ProjectionType": "ALL"
},
"IndexStatus": "ACTIVE",
"ProvisionedThroughput": {
"ReadCapacityUnits": 5,
"WriteCapacityUnits": 5
},
"IndexSizeBytes": 732,
"ItemCount": 6,
"IndexArn": "arn:aws:dynamodb:ddblocal:000000000000:table/Addresses/index/UserIndex"
}
]
}