lundi 1 juin 2015

DynamoDB: Insert a new Row with unique GSI

I am using DynamoDBMapper to insert a new object to my table. Table structure:

key: hash_key attribute1: global sec index other attributes

Now i want the value of attribute1 to be unique in the table. How to do that?

Already tried:

a. map.put("attribute1", new ExpectedAttributeValue(false)); b. map.put("atrribute1", new ExpectedAttributeValue().withExists(false));

I am using mapper.save() with default SaveBehaviour.




Aucun commentaire:

Enregistrer un commentaire