payload
payload copied to clipboard
Error: Cannot find field for path at field_name using row field and nested property query. (Postgres V3.1.1)
Describe the Bug
Bug with nested properties query when using row field in collection.
Link to the code that reproduces this issue
N/A
Reproduction Steps
I have collection Countries which contains field row and code text field within this field
{ type: 'row', fields: [ { name: 'code', type: 'text' } ] }
In another collection im using countries collection as hasMany relation.
when im trying call for eg.
where: { 'countries.code': { equals: 'US' } }
it throws Error: Cannot find field for path at code
after i moved field on root collection fields setting its working fine
Im using Local API
Error details:
ERROR: Cannot find field for path at name err: { "type": "APIError", "message": "Cannot find field for path at name", "stack": APIError: Cannot find field for path at name at getTableColumnFromPath (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_vko6txs7alcmh6am6erlhryeyq/node_modules/@payloadcms/drizzle/dist/queries/getTableColumnFromPath.js:564:11) at getTableColumnFromPath (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_vko6txs7alcmh6am6erlhryeyq/node_modules/@payloadcms/drizzle/dist/queries/getTableColumnFromPath.js:393:32) at parseParams (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_vko6txs7alcmh6am6erlhryeyq/node_modules/@payloadcms/drizzle/dist/queries/parseParams.js:56:242) at buildAndOrConditions (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_vko6txs7alcmh6am6erlhryeyq/node_modules/@payloadcms/drizzle/dist/queries/buildAndOrConditions.js:14:88) at parseParams (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_vko6txs7alcmh6am6erlhryeyq/node_modules/@payloadcms/drizzle/dist/queries/parseParams.js:35:123) at buildQuery (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_vko6txs7alcmh6am6erlhryeyq/node_modules/@payloadcms/drizzle/dist/queries/buildQuery.js:24:77) at find (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_vko6txs7alcmh6am6erlhryeyq/node_modules/@payloadcms/drizzle/dist/find/findMany.js:27:119) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) "data": null, "isOperational": true, "isPublic": false, "status": 500, "name": "APIError" }
Which area(s) are affected? (Select all that apply)
db-postgres
Environment Info
Node.js
Next.js
Local API