I must be missing something simple here. The goal of this test is to set a new element in an existing Map. The following PHP test function works fine to update the item, but instead of setting the person attribute's (a Map) middle initial value to "T", it creates a new top level attribute called "person.mi" and sets it to "T".
The docs for Document Paths specify dot notation for accessing Map elements, so....I don't know what I am missing.
public function Z() {
$ddb = DynamoDbClient::factory(array('region' => 'us-east-1')); // EC2 role security
try {
$response = $ddb->updateItem(array(
"TableName" => "test",
"Key" => array("id" => array("N" => 1)),
"UpdateExpression" => "SET #fieldName = :value",
"ExpressionAttributeNames" => array("#fieldName" => "person.mi"),
"ExpressionAttributeValues" => array(":value" => array("S" => "T"))
));
} catch (Exception $e) {
throw new DDBException("Call to TestDDB->Z failed: " . $e->getMessage());
}
}
Anyone see where I am going wrong? Thanks.