We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No response
Payload: 3.0.0-beta.113 Node: 20.16.0 pnpm: 9.12.1
I am trying to use joins for a collection and I am faced with this error:
⨯ TypeError: Cannot read properties of undefined (reading 'articles') at Array.forEach (<anonymous>) at Array.forEach (<anonymous>) at Array.forEach (<anonymous>) digest: "2347669909" 709 | const fieldSchemaPath = `${fieldPrefix || ''}${field.name}`; 710 | let target; > 711 | const joinConfig = joins[field.collection].find(({ schemaPath })=>fieldSchemaPath === schemaPath); | ^ 712 | if (joinConfig.targetField.hasMany) { 713 | target = `${adapter.tableNameMap.get(toSnakeCase(field.collection))}${adapter.relationshipsSuffix}`; 714 | } else {
Here's my relationship field on the articles collection:
{ name: 'chapter', type: 'relationship', relationTo: 'chapters', hasMany: false, }
And here's the join field on the chapters collection:
{ name: 'relatedArticles', type: 'join', collection: 'articles', on: 'chapter', }
db-postgres
The text was updated successfully, but these errors were encountered:
fix: join field works on collections with versions enabled (#8715)
8af00f2
- Fixes errors with drizzle when building the schema #8680 - Adds `joins` to `db.queryDrafts` to have them when doing `.find` with `draft: true`
Fixed in #8715
Sorry, something went wrong.
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.
r1tsuu
No branches or pull requests
Link to reproduction
No response
Environment Info
Payload: 3.0.0-beta.113
Node: 20.16.0
pnpm: 9.12.1
Describe the Bug
I am trying to use joins for a collection and I am faced with this error:
Here's my relationship field on the articles collection:
And here's the join field on the chapters collection:
Reproduction Steps
Adapters and Plugins
db-postgres
The text was updated successfully, but these errors were encountered: