java - How to delete record using primarykey in dynamodb - Stack Overflow
documentTypeId
is primarykey for cd_documentTypes
table, this primarykey is used in cd_accounts
table as a foreignkey.
If the table having foreignkey relation we must mention the @DynamoDBRangeKey
annotation above documentTypeId attribute in Account class. Problem is solved after declared the @DynamoDBRangeKey
on top of the attribute documentTypeId
.
@DynamoDBRangeKey private String documentTypeId;
If we want to save or update or delete records in amazon dynamodb using java we must mention the annotation @DynamoDBHashKey
on top of the primarykey column.
@DynamoDBAutoGeneratedKey @DynamoDBHashKey private String accountId;
Below is the image shown for foreignkey relation exists in cd_accounts
table.
Note:Range key attribute
field is displayed if the table is mapping to another table primarykey in amaozong dynamodb.
Read full article from java - How to delete record using primarykey in dynamodb - Stack Overflow
No comments:
Post a Comment