Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

withStorage - allow arbitrary and composite PKs #6

Open
adrians5j opened this issue May 22, 2020 · 0 comments
Open

withStorage - allow arbitrary and composite PKs #6

adrians5j opened this issue May 22, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@adrians5j
Copy link
Member

adrians5j commented May 22, 2020

Introduction

Currently, the withStorage layer works with the id field as the entity's PK. The value of the id field is always a simple MongoDB ID.

This is not good for a couple of reasons.

  1. In some databases, like e.g. DynamoDB, the user basically never uses a randomly generated ID for PKs. So, this means we need to ensure that users can use any arbitrary string as the PK.

  2. Users cannot define a composite PK - a key that consists of two or more fields.

The solution

We need to allow users to use any arbitrary string as the PK, and we need to allow defining composite PKs.

Implementation details

TBD

@adrians5j adrians5j added the enhancement New feature or request label May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant