I was trying to use batchDelete in our app, get the result (which are the deleted Items) and process other things regarding those deleted Items.
In the docs, it says:
Returns an async iterable of items that have been deleted (deleted items are yielded when the delete has been accepted by DynamoDB).
Basically, I have a wrapper function in a service to do that. Following the code:
If we pass an existing entityId but a wrong projectId, the batchDelete does not delete the Item, but it does returns actually the given argument.
I mean, if we pass to the function above the right Model class and [{ projectId: 'wrong-project-id', entityId: as existing entityId }], batchDelete is returning [{ projectId: 'wrong-project-id', entityId: as existing entityId }] event if the Item has not been deleted
Could someone check if we are doing something wrong, or is there a bug in this function?
I was trying to use
batchDelete
in our app, get the result (which are the deleted Items) and process other things regarding those deleted Items.In the docs, it says:
Returns an async iterable of items that have been deleted (deleted items are yielded when the delete has been accepted by DynamoDB).
Basically, I have a wrapper function in a service to do that. Following the code:
In our DynamoDB, we have
If we pass an existing
entityId
but a wrongprojectId
, thebatchDelete
does not delete the Item, but it does returns actually the given argument. I mean, if we pass to the function above the right Model class and[{ projectId: 'wrong-project-id', entityId: as existing entityId }]
,batchDelete
is returning[{ projectId: 'wrong-project-id', entityId: as existing entityId }]
event if the Item has not been deletedCould someone check if we are doing something wrong, or is there a bug in this function?