mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 16:24:18 +03:00
Elaborated on nested relationships (#7051)
This commit is contained in:
parent
6196e9c8cd
commit
a73d3c309f
|
@ -245,7 +245,9 @@ This field is always read-only.
|
|||
|
||||
# Nested relationships
|
||||
|
||||
Nested relationships can be expressed by using serializers as fields.
|
||||
As opposed to previously discussed _references_ to another entity, the referred entity can instead also be embedded or _nested_
|
||||
in the representation of the object that refers to it.
|
||||
Such nested relationships can be expressed by using serializers as fields.
|
||||
|
||||
If the field is used to represent a to-many relationship, you should add the `many=True` flag to the serializer field.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user