Open Zevgon opened 8 months ago
Hello ! I had the same issue while using two ORM's in the same server. I had to create patch to disable the types parser and handle it myself. Would love to see this issue resolved. Many thanks !
Drizzle changes the global mappings of certain data types when initializing the DB instance.
What version of
drizzle-orm
are you using?0.30.1
What version of
drizzle-kit
are you using?0.20.14
Describe the Bug
In the following snippet, the 2 query responses are different, even though the client and the query are the same.
It looks like this is because the NodePgDriver.initMappers method sets the type parsers globally, instead of setting them just for the client. I verified that this can be fixed by using
this.client.setTypeParser
instead of using the importedtypes
, although I'm not sure what all the implications of that are.Drizzle looks crazily cool but this bug is a hard blocker for our team.
Expected behavior
Wrapping one client in drizzle should not affect the behavior of other clients.
Environment & setup
No response