Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions guides/security/aspects.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,8 @@ To prevent clients from requesting too much data, you can define restrictions on
- Use `@Capabilities.ExpandRestrictions.NonExpandableProperties: [...]` to restrict expands for certain properties.
- Use `@Capabilities.ExpandRestrictions.MaxLevels: ...` to set maximum allowed depth of an `$expand` from this entity. You can set an application-wide limit with <Config java>cds.query.restrictions.expand.maxLevels = \<max depth\></Config> that applies to all entities. Value `-1` indicates absence of limit.

These restrictions also apply on CQN queries sent to the [application services](/java/cqn-services/#application-services).
Comment thread
vmikhailenko marked this conversation as resolved.
Outdated

Good candidates for expand restrictions are associations to the same type (for example, when your entity represents tree or a hierarchy<sup>1></sup>), backlink associations of compositions, or many-to-many associations.

<sup>1></sup>Hierarchical requests from the UI5 tree table do not use expand and are not affected by expand restriction.
Expand Down