Skip to content

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

@TishoTM

Description

@TishoTM

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions