Skip to content

Secondary index keys not updated when using composite attributes from table's primary index #286

Closed
@misterjoshua

Description

@misterjoshua

Describe the bug
When I use the update mutation to create an item, the secondary index keys are not included in the update even though all the attributes used in the secondary index are part of the primary index.

ElectroDB Version
2.8.2

ElectroDB Playground Link
Playground Link

Entity/Service Definitions
See the playground link: Playground Link

Expected behavior
I expected the update mutation to generate the secondary index keys.

Errors
I didn't receive any error message, but the result is that the update causes an incomplete record to be written when it should have been possible to write a complete record.

Additional context
Maybe I've misinterpreted the docs, but I was going off of this section:

In the event that a secondary index includes composite values from the table’s primary index, ElectroDB will draw from the values supplied for the update key to address index gaps in the secondary index.

Source: https://electrodb.dev/en/mutations/update/#updating-composite-attributes

I'm a fairly new ElectroDB user, so forgive me if I've missed something obvious. Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions