mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 17:09:59 +03:00
Elaborated on nested relationships
This commit is contained in:
parent
8988afa082
commit
75ed54ab76
|
@ -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