Skip to content

Commit e075975

Browse files
authored
Nested relations in PropertyFilter
1 parent 66f9ce9 commit e075975

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/filters.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ Given that the collection endpoint is `/books`, you can filter by serialization
602602

603603
The property filter adds the possibility to select the properties to serialize (sparse fieldsets).
604604

605-
Syntax: `?properties[]=<property>`
605+
Syntax: `?properties[]=<property>&properties[<relation>]=<property>`
606606

607607
You can add as many properties as you need.
608608

@@ -635,6 +635,7 @@ Three arguments are available to configure the filter:
635635
- `whitelist` properties whitelist to avoid uncontrolled data exposure (default `null` to allow all properties)
636636

637637
Given that the collection endpoint is `/books`, you can filter the serialization properties with the following query: `/books?properties[]=title&properties[]=author`.
638+
If you want to include some properties of the nested "author" document, use: `/books?properties[]=title&properties[author]=name`.
638639

639640
## Creating Custom Filters
640641

0 commit comments

Comments
 (0)