Closed sum117 closed 3 months ago
I was having a similar issue and I it has been fixed (at least for my case) in drizzle-orm@0.30.2
This bug was fixed in drizzle-orm@0.30.2 in PR #1885
@shaileshaanand This issue probably should be closed if fixed.
Still, I have a concern with your implementation in #1885 regarding performance and usage of Bun underlying API.
Shouldn't we be using get
instead of values
, and then make it an array for the mapping if it is required ?
It's just hat get
should be using get
, somehow, don't you agree ?
I also found https://github.com/drizzle-team/drizzle-orm/pull/1276 which seemed to have another approach, but it doesn't seem perfect either.
There's probably some improvements to do.
What version of
drizzle-orm
are you using?0.29.4
What version of
drizzle-kit
are you using?0.20.14
Describe the Bug
When using the
.query
api, it's possible to use thefindMany()
method, but when I attempt to use thefindFirst()
one, an object with undefined fields is returned, and inside the drizzle studio, trying the same results in this:Example inside drizzle studio
Example inside IDE
⚠️ When hovering over the method
findFirst()
, I get this message: TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context.Expected behavior
We should be able to get the result back without this weird typeError. I'm having to use this query to make it work:
Environment & setup
I'm using bun v1.0.30:
Package.json
My schema