Describe the Bug
I have a collection Roles which is virtually linked to Projects and in relation Tenant. In the read access of Roles I query using the virtual field tenantSlug (tenant.slug).
The error happens when I list Projects, e.g. /api/projects but not when I list roles /api/roles
Maybe related to #12884
Link to the code that reproduces this issue
https://github.com/Xmaster6y/debug-join
Reproduction Steps
- Run
pnpm run dev
- Go to
/api/projects
Which area(s) are affected?
area: core
Environment Info
Binaries:
Node: 24.8.0
npm: 11.6.0
Yarn: 1.22.22
pnpm: 10.17.0
Relevant Packages:
payload: 3.72.0
next: 15.4.10
@payloadcms/db-sqlite: 3.72.0
@payloadcms/drizzle: 3.72.0
@payloadcms/graphql: 3.72.0
@payloadcms/next/utilities: 3.72.0
@payloadcms/richtext-lexical: 3.72.0
@payloadcms/translations: 3.72.0
@payloadcms/ui/shared: 3.72.0
react: 19.2.1
react-dom: 19.2.1
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:29:54 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T8122
Available memory (MB): 16384
Available CPU cores: 8
Describe the Bug
I have a collection
Roleswhich is virtually linked toProjectsand in relationTenant. In the read access ofRolesI query using the virtual fieldtenantSlug(tenant.slug).The error happens when I list
Projects, e.g./api/projectsbut not when I list roles/api/rolesMaybe related to #12884
Link to the code that reproduces this issue
https://github.com/Xmaster6y/debug-join
Reproduction Steps
pnpm run dev/api/projectsWhich area(s) are affected?
area: core
Environment Info