Random number is actually floating value #1589
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
Multiple projects here use the following code to generate a random ID:
https://github.com/prisma/e2e-tests/search?q=const+rand+%3D+Math.random%28%29.toString%28%29
As
Math.random()
generates a value between 0 and 1, this returnss a value like0.7287719726956376
. That is probably not expected and wanted.Some databases probably just cast that value, or we are not using it further.
The text was updated successfully, but these errors were encountered: