Anyone have a good example of using @dynamodb with a single table and multiple entities? Having a hard time finding a good example. Most sample apps don't seem to use one table as recommended by #AWS as best practice.
Not sure I understand. Our lib did incrementing integers. Something like UUID prob makes more sense.
-
-
So let's say I need to load all users. If I make the partition key a guid, I am not sure I can search for all of the users without doing a full table scan (which is slow). I think for top level entities maybe you want to make partition key fixed
-
This is where you make a global secondary index on the sort key. So to get all users you query the secondary index for things that start with "user"
End of conversation
New conversation -
-
-
The partition key could be a guid, or it could be a string like "users" with a sort key being a guid. For top level entities, I think as long as you hardcode it you can still query, so you're golden there.
-
To be clear, I could make the partition key a guid for the top level entity and then keep it hard-coded in my code. So all Users could be identified by like `${knownGuid}#${userSpecificGuid}`. That's functionally the same as `USER#${someGuid}` I think.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.