Relational query error: "Cannot read properties of null (reading 'map')"
Hi, have an issue and was wondering if anyone has stumbled upon a similar thing?
When doing a query like:
I get the following error : (see pic for full error)
The
Cannot read properties of null (reading 'map') at Object.mapRelationalRow....
error appears when trying to make a relational one-to-many queries.
The thing is, the error only happens when there is no gisAttachments with reference id to the workorder. But when there is one it works.
I expect it to return an empty array, but drizzle throws this error.
Relation definition:
Thank you in advance for the assistance!2 Replies
Hello, @strandhvilliam! Could you please provide your full schema and
drizzle-orm
version? I tested with my similar code and can't reproduce the issue.
Thank you @solo ! Here is the relevant schema code. We are currently running "drizzle-kit": "^0.19.13",
and "drizzle-orm": "^0.28.6".