-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
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
Self-Join Depths Greater Than 1 Not Working #10243
Comments
I added some tests here #10336 to confirm that it's not an issue but happens because the default You need to increase it if you want your join field to be populated within other relationship / join fields. https://payloadcms.com/docs/fields/join#config-options |
Thanks! I wasn't aware of the maxDepth config. |
This issue has been automatically locked. |
Describe the Bug
The depth parameter for self-joins does not work as expected. It only applies correctly for depths 0 and 1. For example, if you have nested categories up to depth 5, the depth parameter will not fetch beyond the first level of children.
Link to the code that reproduces this issue
https://github.com/tobiasiv/payload-reproduction/tree/self-join-depth
Reproduction Steps
pnpm dev
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
The text was updated successfully, but these errors were encountered: