-
-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[batchGet] Use original item when comparing keys #1607
base: main
Are you sure you want to change the base?
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. |
recheck |
This pull request is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 3 days. |
👋 @fishcharlie is there any interest in merging this PR? Otherwise I'll just close it as it's tickling my OCD anytime I look into my open PRs and I always find this one stalled there 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gbasto I'm so sorry for the delay here. Yes there is interest in this PR. It needs some automated tests to ensure regressions don't happen in the future tho.
Any chance you'd be willing to add those?
These tests should fail without the changes you made in this PR, and should pass with the changes you made in this PR.
Summary:
When using
batchGet
, it prepares the response by searching the items from a temp result by comparing their keys. Problem is that if these items have any transformation on their keys, they will never be found because the original keys are used in the search, always resulting in an empty response.GitHub linked issue:
Closes #1442
Other information:
I've opted to put the original object in a temporary variable inside
find
to avoid multiple calls toitem.original()
. Alternatively we could one line with residual performance impact:Type (select 1):
Is this a breaking change? (select 1):
Is this ready to be merged into Dynamoose? (select 1):
Are all the tests currently passing on this PR? (select 1):
Other: