docs: fix foreign key bullet list formatting (#1079)
Co-authored-by: collerek <collerek@gmail.com>
This commit is contained in:
@ -35,16 +35,18 @@ Reverse relation exposes API to manage related objects also from parent side.
|
||||
If you are sure you don't want the reverse relation you can use `skip_reverse=True`
|
||||
flag of the `ForeignKey`.
|
||||
|
||||
If you set `skip_reverse` flag internally the field is still registered on the other
|
||||
side of the relationship so you can:
|
||||
* `filter` by related models fields from reverse model
|
||||
* `order_by` by related models fields from reverse model
|
||||
If you set `skip_reverse` flag internally the field is still registered on the other
|
||||
side of the relationship so you can:
|
||||
|
||||
But you cannot:
|
||||
* access the related field from reverse model with `related_name`
|
||||
* even if you `select_related` from reverse side of the model the returned models won't be populated in reversed instance (the join is not prevented so you still can `filter` and `order_by` over the relation)
|
||||
* the relation won't be populated in `dict()` and `json()`
|
||||
* you cannot pass the nested related objects when populating from dictionary or json (also through `fastapi`). It will be either ignored or error will be raised depending on `extra` setting in pydantic `Config`.
|
||||
* `filter` by related models fields from reverse model
|
||||
* `order_by` by related models fields from reverse model
|
||||
|
||||
But you cannot:
|
||||
|
||||
* Access the related field from reverse model with `related_name`
|
||||
* Even if you `select_related` from reverse side of the model the returned models won't be populated in reversed instance (the join is not prevented so you still can `filter` and `order_by` over the relation)
|
||||
* The relation won't be populated in `dict()` and `json()`
|
||||
* You cannot pass the nested related objects when populating from dictionary or json (also through `fastapi`). It will be either ignored or error will be raised depending on `extra` setting in pydantic `Config`.
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user