I have a weird issue that I can't get my head arou...
# orm-help
s
I have a weird issue that I can't get my head around. Basically, I have a URL with a parameter
transaction_id=22596059218
. Now I want to update this into a Prisma integer field. I convert the query parameter string to an integer with
transactionId = parseInt(transaction_id)
and update
Copy code
await prisma.user.update({
		where: { id: userId },
		data: {
			transactionId,
		}
	})
The weird bit is, when I check in Prisma studio, the value for
transactionId
is
1121222738
. Anyone have an idea?
1
r
Hi @shahrukh ahmed 👋 What database are you using? Also at first glance, the max value that can be stored in an integer is
2147483647
and you are storing
22596059218
. Would using a
BigInt
datatype suffice for you?
s
Hi Raphael, Thank you for the reply. I am using Postgresql. Oh, never occurred to me. Maybe I will just switch to String since this won't be searched or used for indexing.
👍 1