Skip to content
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

model->update() uses the putItem instead of updateItem #286

Open
TishoTM opened this issue Sep 13, 2024 · 0 comments
Open

model->update() uses the putItem instead of updateItem #286

TishoTM opened this issue Sep 13, 2024 · 0 comments

Comments

@TishoTM
Copy link

TishoTM commented Sep 13, 2024

Describe the bug

In cases when Dynamo items are queried via GSI with limited projection fields and then "updated" via the update() method, the fields that are not part of the GSI projected get implicitly removed.

The "BaoPham\DynamoDb\DynamoDbQueryBuilder" save() method uses the AWS putItem() instead of the updateItem() when the record exists.

Schema

GSI with a limited number of fields

Version info

  • Laravel: 9
  • laravel-dynamodb: 6.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant