lundi 28 septembre 2015

How expected works in putItemRequest in dynamoDB

As per the documentation of PutItemRequest, if we provide the expected map, it is Anded for the provided conditions.

I added following piece of code:

Map<String, ExpectedAttributeValue> expected = new HashMap<String, ExpectedAttributeValue>();
            expected.put("userId", new ExpectedAttributeValue(false));
            expected.put("email", new ExpectedAttributeValue(false));

Here userId is the primary key. This is, however, accepting duplicate email information.

Can anyone please help me in finding what wrong is being done here?




Aucun commentaire:

Enregistrer un commentaire