Add support for cross-database foreign keys and m2m
|Reported by:||Russell Keith-Magee||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.2-alpha|
|Cc:||Zbigniew Braniecki||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Django's multidb support currently prevents foreign keys from referencing foreign databases. This means the obvious use case of "put User objects in the auth database" et al are not possible.
The full solution requires at least the following:
- Modifying ForeignKey to relax foreign key constraints if it is known that the foreign key will be on another database
- Providing hooks to allow FK and M2M descriptors to look up the right database to use
There has been some initial discussion on django users about this subject.
Change History (11)
comment:1 Changed 7 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|
comment:7 Changed 3 years ago by