You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where an accessor exists on a partition key, the key is passed through the accessor prior to query being executed, resulting in queries that can be incorrect.
Schema
Primary key: siteSensor (string)
Partition key: dateFrom (string)
No GSI
Note that the date string is being passed into the mutator first, then back to the accessor. Changing the date input string to 2020-11-01 does not make a difference since it still gets fed to the accessor.
Throwing a stack trace in the accessor shows that at vendor/baopham/dynamodb/src/DynamoDbModel.php:386 the following call is made, which subsequently passed the values throw the accessors:
$key[$name] = $this->getAttribute($name); Version info
Laravel: 6.18.13
laravel-dynamodb: 6.1.1 (also exists in 6.1.0)
The text was updated successfully, but these errors were encountered:
Describe the bug
Where an accessor exists on a partition key, the key is passed through the accessor prior to query being executed, resulting in queries that can be incorrect.
Schema
Primary key: siteSensor (string)
Partition key: dateFrom (string)
No GSI
In the Eloquent model:
I also use typical date mutator/accessor to convert from European dd/mm/YYYY to/from YYYY-mm-dd
Debug info
Show the query that you're having trouble with by copy-pasting the result of:
Note that the date string is being passed into the mutator first, then back to the accessor. Changing the date input string to 2020-11-01 does not make a difference since it still gets fed to the accessor.
Throwing a stack trace in the accessor shows that at vendor/baopham/dynamodb/src/DynamoDbModel.php:386 the following call is made, which subsequently passed the values throw the accessors:
$key[$name] = $this->getAttribute($name);
Version info
The text was updated successfully, but these errors were encountered: