-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Report hasn't been filed before.
- I have verified that the bug I'm about to report hasn't been filed before.
What version of drizzle-orm
are you using?
0.44.5
What version of drizzle-kit
are you using?
0.31.4
Other packages
No response
Describe the Bug
Here is SQL executed by drizzle:
SELECT "consultationOutput"."id",
"consultationOutput"."consultation_id",
"consultationOutput"."language",
"consultationOutput"."status",
"consultationOutput"."diagnosis",
"consultationOutput"."treatment",
"consultationOutput"."prescriptions",
"consultationOutput"."updated_at",
"consultationOutput_consultation"."data" AS "consultation"
FROM "consultation_output" "consultationOutput"
LEFT JOIN LATERAL
(SELECT json_build_array("consultationOutput_consultation"."patient_id") AS "data"
FROM
(SELECT *
FROM "consultation" "consultationOutput_consultation"
WHERE "consultationOutput_consultation"."id" = "consultationOutput"."consultation_id"
LIMIT $1) "consultationOutput_consultation") "consultationOutput_consultation" ON TRUE
WHERE "consultationOutput"."id" = $2
LIMIT $3
There is some whacky JSON array, which contains bigint
ids.
They are converted to number
and lose precision.
There is no way of parsing them to bigint
using custom drizzle type or postgres.js
transforms, because JSON transformation (thus precision losing) happens in db.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working