Open jessehansen opened 3 months ago
Specific values are losing precision when typed into Decimal fields in Prisma Studio. Some example values: 83261.85 and 97.43.
83261.85
97.43
See also https://github.com/prisma/prisma/issues/20881
Create a model with a decimal field, and enter a value of 83261.85 into a new record. Refresh, and see that 83261.85000000001 was persisted.
83261.85000000001
Entering a value in prisma studio should persist that value, and not a different value.
Sample Schema:
generator client { provider = "prisma-client-js" } datasource db { provider = "postgresql" url = "postgresql://local:local@localhost:5434/test_things?schema=public" } model ThingWithDecimal { id Int @id @default(autoincrement()) amount Decimal }
No response
Bug description
Specific values are losing precision when typed into Decimal fields in Prisma Studio. Some example values:
83261.85
and97.43
.See also https://github.com/prisma/prisma/issues/20881
How to reproduce
Create a model with a decimal field, and enter a value of
83261.85
into a new record. Refresh, and see that83261.85000000001
was persisted.Expected behavior
Entering a value in prisma studio should persist that value, and not a different value.
Prisma information
Sample Schema:
Environment & setup
Prisma logs
No response