mysql bigint columns relational query loses precision

The products ids are correct but prices ids are wrong. Already have supportBigNumbers: true, bigNumberStrings: true,
const products = await db.query.product.findMany({
where: eq(product.active, true),
with: {
prices: {
where: eq(price.productPriceType, productType),
},
},
const products = await db.query.product.findMany({
where: eq(product.active, true),
with: {
prices: {
where: eq(price.productPriceType, productType),
},
},
export const bigintString = customType<{
data: string;
driverData: string;
notNull: false;
default: false;
}>({
dataType() {
return "bigint unsigned";
},

fromDriver(value): string {
console.log("fromDriver input:", value, typeof value);
return value.toString();
},
});
export const bigintString = customType<{
data: string;
driverData: string;
notNull: false;
default: false;
}>({
dataType() {
return "bigint unsigned";
},

fromDriver(value): string {
console.log("fromDriver input:", value, typeof value);
return value.toString();
},
});
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?