Skip to content

fix(drizzle): check rawRelations instead of table existence to avoid naming collision (#16181)#16189

Open
deepshekhardas wants to merge 1 commit intopayloadcms:mainfrom
deepshekhardas:fix/16181-array-field-numbers
Open

fix(drizzle): check rawRelations instead of table existence to avoid naming collision (#16181)#16189
deepshekhardas wants to merge 1 commit intopayloadcms:mainfrom
deepshekhardas:fix/16181-array-field-numbers

Conversation

@deepshekhardas
Copy link
Copy Markdown
Contributor

Fixes #16181 - Array field named numbers causes TypeError

Problem: When a collection has an array field named numbers, texts, or rels, queries fail with TypeError due to table existence check false positives

Solution: Changed table existence checks to relation existence checks using adapter.rawRelations

…naming collision (payloadcms#16181)

Changed table existence check to relation existence check in buildFindManyArgs

This prevents false positives when array fields are named numbers, texts, or rels

Fixes payloadcms#16181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Array field named numbers causes TypeError: Cannot read properties of undefined (reading 'referencedTable')

1 participant