This repository was archived by the owner on Feb 5, 2024. It is now read-only.
This repository was archived by the owner on Feb 5, 2024. It is now read-only.
DynamoDB - array_combine(): Both parameters should have an equal number of elements #100
Open
Description
Version: v0.4.0
Error:
array_combine(): Both parameters should have an equal number of elements
/app/vendor/doctrine/key-value-store/lib/Doctrine/KeyValueStore/Storage/DynamoDbStorage.php:116
/app/vendor/doctrine/key-value-store/lib/Doctrine/KeyValueStore/Storage/DynamoDbStorage.php:136
/app/vendor/doctrine/key-value-store/lib/Doctrine/KeyValueStore/UnitOfWork.php:255
/app/vendor/doctrine/key-value-store/lib/Doctrine/KeyValueStore/UnitOfWork.php:280
/app/vendor/doctrine/key-value-store/lib/Doctrine/KeyValueStore/EntityManager.php:115
Table format:
$params = [
'TableName' => "user",
'KeySchema' => [
[
'AttributeName' => 'id',
'KeyType' => 'HASH' // partition key
],
[
'AttributeName' => 'createdAt',
'KeyType' => 'RANGE' // sort key
]
],
'AttributeDefinitions' => [
[
'AttributeName' => 'id',
'AttributeType' => 'S' // S (string), N (number), B (binary)
],
[
'AttributeName' => 'createdAt',
'AttributeType' => 'N'
],
[
'AttributeName' => 'userIdGroup',
'AttributeType' => 'S'
],
],
'GlobalSecondaryIndexes' => [
[
'IndexName' => 'type-grouped',
'KeySchema' => [
[
'AttributeName' => 'userIdGroup',
'KeyType' => 'HASH' // partition key
],
[
'AttributeName' => 'createdAt',
'KeyType' => 'RANGE' // sort key
]
],
'Projection' => [
// 'NonKeyAttributes' => ['userIdGroup'],
'ProjectionType' => 'ALL',
],
'ProvisionedThroughput' => [
'ReadCapacityUnits' => 10,
'WriteCapacityUnits' => 10
],
],
],
'ProvisionedThroughput' => [
'ReadCapacityUnits' => 10,
'WriteCapacityUnits' => 10
]
];
$this->dynamoDb->createTable($params);
Explodes when doing a find by primary key.
Metadata
Metadata
Assignees
Labels
No labels