Why custom ID for user in DB? #1565
-
What's currently expected (example with Prisma):
Why not the following?
Why do we need to generate the userId ourselves? Wouldn't be it be one less step, and therefore even simpler for the developer and less error prone, to just let the internals of the ORM generate the ID? Is there any reason for using the extra step to create a custom |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You're free to do whatever you want in regards to user creation :D The docs just show one way of doing it. (One reason you might want to generate IDs yourself is that your DB engine might not be using a secure RNG, which may or may not be ideal) |
Beta Was this translation helpful? Give feedback.
You're free to do whatever you want in regards to user creation :D The docs just show one way of doing it.
(One reason you might want to generate IDs yourself is that your DB engine might not be using a secure RNG, which may or may not be ideal)