tywalch/electrodb

empty composite key

Closed this issue · 5 comments

Hey @tywalch, first of all, great to know that SST is using ElectroDB as their tool of choice.

I've been trying to use an empty composite primary key like this:

image

But it gives me this message: instance.indexes.primary.pk.composite does not meet minimum length of 1.

The reason being that, in some entities, I want them to be partitioned only by the service name (which is added to the pk automatically), nothing else. I could just have a field emptyKey or something, but I just thought whether there's a cleaner way of doing that - or even if you are interested in supporting that use case.

Hi @jpmtrabbold!

This was recently requested and the latest version should allow for an empty array here. Can you verify the version you are using?

Thanks @tywalch I'll try right away! Worth mentioning that the ElectroDB playground is probably not in that version then, because it's giving the error

Thank you I will look into that, and roll that change into criteria to close this ticket.

just so you know, the new version worked on my project - thanks!

@jpmtrabbold The playground has been updated, I am going to close this ticket, but feel free to reopen if you have any other issues 👍