Drizzle produces wrong branded type using Zod
It appears using brands with Drizzle Zod doesn't work correct?
So effectively anytime you use your return value produced by
db.insert().returning()
and pass the ID field (branded) to another param that expects the branded FileId
, you get an error like
4 Replies
I'm not sure what
[BRAND]: { FileId: boolean; };
means and why its a boolean, or if the issue is the object is just totlaly different betwen what is expected , where the entire object just doesnt matchIt seems there's an issue with branded schemas. Could you file a GH issue with the same info as above so we can keep track of it?
GitHub
[BUG]:Branded Zod Types Not Working As Expected · Issue #3834 · dri...
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.38.2 What version of drizzle-kit...
Thanks
And happy holidays to you too :)