Expected behaviour on GSIs with empty primary key composite arrays #292
Closed
PeterBaker0
started this conversation in
General
Replies: 3 comments 3 replies
-
I also have a minimal example to show the issue (though it may just be a misunderstanding on my part): playground link Code here
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks @PeterBaker0! I have a PR out that will address this, I actually found the same issue recently, thank you for creating a discussion for this topic 👍 I will be merging this PR soon: #293 |
Beta Was this translation helpful? Give feedback.
1 reply
-
@PeterBaker0 This was merged yesterday, let me know if you have any issues 👍 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am new to Electro DB but relatively familiar with DynamoDB overall.
Here is my Electro DB schema I am playing with
I want to enable two query use cases:
My understanding based on the quote below from the docs
Suggests that an empty composite array would just result in values being automatically filled for the "gsi1pk" field with the service and version values. Previous experimentation did show this behaviour when the pk in question was the table index (rather than a GSI).
If I create an item like so:
I see an item created with the following values
There is no "gsi1pk" field, meaning that a query op against this index
returns an empty result.
Is this expected behaviour?
Is there a preferred pattern for this simple set of query patterns?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions