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

Support IDs as strings #113

Closed
Drarig29 opened this issue Dec 22, 2021 · 5 comments · Fixed by #114
Closed

Support IDs as strings #113

Drarig29 opened this issue Dec 22, 2021 · 5 comments · Fixed by #114
Labels
enhancement New feature or request

Comments

@Drarig29
Copy link
Owner

I'd like to use the manager with a MongoDB database and it uses string IDs, so it would be cool to be able to work with strings instead of integers.

@Drarig29 Drarig29 added the enhancement New feature or request label Dec 22, 2021
@humarkx
Copy link

humarkx commented Apr 11, 2022

@Drarig29 Any news on this Issue/PR?

@Drarig29
Copy link
Owner Author

This was meant to be done for MongoDB and the best approach IMO is this one: #127

MongoDB is a document-based database, whereas the approach of brackets-model is more of a relational approach. So it's best to keep this "relational approach" inside a document which acts as a blackbox.

Instead, you use the brackets-memory-db package to work with a local copy of the document.

So, with all of this, you don't need string IDs anymore.


And from a design point of view, this adds a lot of changes in a lot of places, so I prefer not to merge it for now. Unless someone has a good reason to have this feature... do you?

@Drarig29
Copy link
Owner Author

Also, supporting IDs as strings would mean that we can't have (string | number)[] and decide whether an item is an ID or a name based on the type in a seeding input.

Related: #148

@laukaichung
Copy link

laukaichung commented Dec 6, 2022

I'm using years (2014, 2018, 2022 etc) as the tournament ID of each annual tournament, so numeral ID is good for my use case.

@Drarig29
Copy link
Owner Author

Drarig29 commented Jul 2, 2023

Released in v1.6.0

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

Successfully merging a pull request may close this issue.

3 participants