Is there any way to use decimal in schema.prisma w...
# orm-help
a
Is there any way to use decimal in schema.prisma without using DecimalJS? I created this issue a while ago https://github.com/prisma/prisma/issues/13451
✅ 1
a
Hey, Adrian! This is not possible at the time; any updates will occur in the issue you linked. It might be possible to find a workaround for your open-api issue. You could try asking in GitHub Discussions.
a
So I solved it by building a middleware that converts from Float to DecimalJS when fetching, and vice verse, convert to Float from Decimal while inserting/updating. This is a temporary solution until Prisma and MongoDB bring back Decimal