New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bigint(20) UNSIGNED
got signed bigint bound error
#14632
Comments
What kind of Prisma Client query are you trying to execute? Sharing that would help a lot with a reproduction on our side. |
Prisma Client query: const rec = await this.prisma.labels.findUnique({
where: {
id: BigInt("11111111111111111111"),
},
}); Got Exception {
"code": "P2033",
"meta": {
"details": "Query parsing failure: A number used in the query does not fit into a 64 bit signed integer. Consider using `BigInt` as field type if you're trying to store large integers."
},
} Test with native mysql:
Note: |
Still a problem with 4.3.1. Debug logs from the reproduction:
We should extend our support for unsigned integers. There's some good preliminary work related to UUIDs by @tomhoule, that should help here too. |
the same happens for sqlite. Did anyone found a workaround for that? |
bigint(20) UNSIGNED
got signed bigint bound error
This is still an issue as of Prisma 4.11 |
Any updates on this one? |
Hey folks! I can confirm with the following code const prisma = new PrismaClient({
log: ["query"],
});
await prisma.labels.create({
data: {
id: BigInt(11111111111111111111),
},
}); the following error on
However, when updating to latest (now
This change in messaging happened in Prisma Using the I have a reproduction here |
Bug description
Mysql:
Prisma schema:
unsigned BigInt range should be [0, BigInt('18446744073709551615')]
use id = BigInt('11111111111111111111')
Got Error:
Expecdted:
Not error throw if it use unsigned instead of signed internally.
How to reproduce
Expected behavior
Expecdted:
Not error throw if it use unsigned instead of signed internally.
Prisma information
Prisma schema:
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: