You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`relations`| Controls which relations are populated when querying. | - `true`: Populate all relations recursively (default)<br>- `false`: Do not populate any relations<br>- `string[]`: Populate only specific collection types by UID (e.g., `["api::article.article"]`) |
33
-
|`cache`| Enables or disables the plugin’s in-memory cache for faster populate query generation. | - `true` (default)<br>- `false`|
|`relations`| Controls which relations are populated when querying. | - `true`: Populate all relations recursively (default)<br>- `false`: Do not populate any relations<br>- `string[]`: Populate only specific collection types by UID (e.g., `["api::article.article"]`) |
33
+
|`cache`| Enables or disables the plugin’s in-memory cache for faster populate query generation. | - `true` (default)<br>- `false`|
34
+
|`recursion`| Allows a model to populate itself N levels deep when the populate tree revisits the same `modelUid`. By default, self-references are skipped after the first encounter to prevent infinite loops. Use this to opt specific models in to deeper nested self-populations. | An object mapping `modelUid` to a non-negative integer depth, e.g. `{ "api::article.article": 2 }`. `0` (default) means no self-recursion; `1` allows one nested level; `2` allows two; and so on. |
34
35
35
36
Example usage:
36
37
@@ -41,6 +42,10 @@ module.exports = {
41
42
config: {
42
43
cache:true,
43
44
relations:true,
45
+
recursion: {
46
+
// articles can populate their `related` articles 2 levels deep
0 commit comments