Skip to content

fix(plugin-multi-tenant): relationTo arrays inflating filterOptions where query size#14944

Merged
JarrodMFlesch merged 6 commits intomainfrom
fix/multi-tenant-query-size
Dec 16, 2025
Merged

fix(plugin-multi-tenant): relationTo arrays inflating filterOptions where query size#14944
JarrodMFlesch merged 6 commits intomainfrom
fix/multi-tenant-query-size

Conversation

@JarrodMFlesch
Copy link
Contributor

@JarrodMFlesch JarrodMFlesch commented Dec 16, 2025

Before the plugin was looping over relationTo arrays and would build up duplicate tenant queries. Now it just ensures that there is at lease 1 tenant enabled collection and adds a single tenant constraint to the filterOptions.

Helpful to note that the relationships are populated 1 at a time and the filterOptions receives relationTo arg, the injected filter checks to see if the requested relation is a tenant enabled collection also before applying the constraint.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2025

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

@JarrodMFlesch JarrodMFlesch merged commit 98b6791 into main Dec 16, 2025
97 checks passed
@JarrodMFlesch JarrodMFlesch deleted the fix/multi-tenant-query-size branch December 16, 2025 19:54
@github-actions
Copy link
Contributor

🚀 This is included in version v3.69.0

zubricks pushed a commit that referenced this pull request Jan 6, 2026
…here query size (#14944)

Before the plugin was looping over relationTo arrays and would build up
duplicate tenant queries. Now it just ensures that there is at lease 1
tenant enabled collection and adds a single tenant constraint to the
filterOptions.

Helpful to note that the relationships are populated 1 at a time and the
filterOptions receives `relationTo` arg, the injected filter checks to
see if the requested relation is a tenant enabled collection also before
applying the constraint.
teastudiopl pushed a commit to teastudiopl/payload that referenced this pull request Jan 8, 2026
…here query size (payloadcms#14944)

Before the plugin was looping over relationTo arrays and would build up
duplicate tenant queries. Now it just ensures that there is at lease 1
tenant enabled collection and adds a single tenant constraint to the
filterOptions.

Helpful to note that the relationships are populated 1 at a time and the
filterOptions receives `relationTo` arg, the injected filter checks to
see if the requested relation is a tenant enabled collection also before
applying the constraint.
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.

2 participants