mirror of
https://github.com/doctrine/KeyValueStore.git
synced 2026-03-24 08:42:12 +01:00
[PR #84] [CLOSED] Update DynamoDbStorage::find #111
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/KeyValueStore/pull/84
Author: @south634
Created: 5/18/2017
Status: ❌ Closed
Base:
master← Head:master📝 Commits (10+)
4951789Check for item after get attempt instead of before869a8e3Added test1f34f52Merge pull request #1 from ConsumerTrack/fix-fatal-error-on-missing-table-key0174f75Adding QueryBuilder support for dynamo7e8dc70Adding Orx, fixing parenthesis97239b5Adding support for embeddable entities8624f2dAdding support for loading819d389Allow find all entities00185b9Updating7be8d2fFixing function key names, fix parenthesis, adding single result📊 Changes
21 files changed (+1569 additions, -23 deletions)
View changed files
📝
lib/Doctrine/KeyValueStore/EntityManager.php(+15 -0)📝
lib/Doctrine/KeyValueStore/Mapping/AnnotationDriver.php(+41 -4)➕
lib/Doctrine/KeyValueStore/Mapping/Annotations/Embeddable.php(+33 -0)➕
lib/Doctrine/KeyValueStore/Mapping/Annotations/Embedded.php(+36 -0)📝
lib/Doctrine/KeyValueStore/Mapping/Annotations/Entity.php(+5 -0)📝
lib/Doctrine/KeyValueStore/Mapping/ClassMetadata.php(+3 -1)📝
lib/Doctrine/KeyValueStore/Mapping/ClassMetadataFactory.php(+1 -1)➕
lib/Doctrine/KeyValueStore/Query/Expr.php(+281 -0)➕
lib/Doctrine/KeyValueStore/Query/Expr/Andx.php(+63 -0)➕
lib/Doctrine/KeyValueStore/Query/Expr/Base.php(+124 -0)➕
lib/Doctrine/KeyValueStore/Query/Expr/Comparison.php(+100 -0)➕
lib/Doctrine/KeyValueStore/Query/Expr/Composite.php(+71 -0)➕
lib/Doctrine/KeyValueStore/Query/Expr/Func.php(+78 -0)➕
lib/Doctrine/KeyValueStore/Query/Expr/Orx.php(+63 -0)➕
lib/Doctrine/KeyValueStore/Query/Parameter.php(+94 -0)➕
lib/Doctrine/KeyValueStore/Query/Query.php(+34 -0)➕
lib/Doctrine/KeyValueStore/Query/QueryBuilder.php(+322 -0)➕
lib/Doctrine/KeyValueStore/Query/QueryBuilderStorage.php(+41 -0)📝
lib/Doctrine/KeyValueStore/Storage/DynamoDbStorage.php(+116 -3)📝
lib/Doctrine/KeyValueStore/UnitOfWork.php(+45 -13)...and 1 more files
📄 Description
The code below returns an object of Aws\Result even when the table key does not exist in DynamoDB:
Causing this check to pass:
Since the key does not exist a null value is set here:
$item = $item->get(self::TABLE_ITEM_KEY);Then that null $item is passed to:
$this->marshaler->unmarshalItem($item);Which causes a fatal error.
This fix checks $item after attempting to get it instead of before.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.