diff options
| -rw-r--r-- | docs/topics/db/multi-db.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/topics/db/multi-db.txt b/docs/topics/db/multi-db.txt index 38f91c2800..5e423d4981 100644 --- a/docs/topics/db/multi-db.txt +++ b/docs/topics/db/multi-db.txt @@ -232,6 +232,12 @@ cases, no instance hint will be provided at all. The router checks for the existence of an instance hint, and determine if that hint should be used to alter routing behavior. +If an ``instance`` hint is present, the database from which it was fetched +is recorded on its :attr:`instance._state.db <django.db.models.Model._state>`. +Routers will need to first consult that attribute before falling back to any +fixed alias to match Django's default behavior of fetching related instances +from the same database. + Using routers ------------- |
