docs: fix foreign key bullet list formatting (#1079)

Co-authored-by: collerek <collerek@gmail.com>
This commit is contained in:
ChristopherJHart
2023-05-19 05:41:11 -04:00
committed by GitHub
parent 465970f032
commit ab9873abed

View File

@ -37,14 +37,16 @@ flag of the `ForeignKey`.
If you set `skip_reverse` flag internally the field is still registered on the other If you set `skip_reverse` flag internally the field is still registered on the other
side of the relationship so you can: side of the relationship so you can:
* `filter` by related models fields from reverse model * `filter` by related models fields from reverse model
* `order_by` by related models fields from reverse model * `order_by` by related models fields from reverse model
But you cannot: 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) * Access the related field from reverse model with `related_name`
* the relation won't be populated in `dict()` and `json()` * 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)
* 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`. * 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: Example: