#25811: Error querying across foreign keys with models in different databases
-------------------------------------+-------------------------------------
Reporter: ebar0n | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 1.8
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: database | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):
* status: new => closed
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* resolution: => invalid
Comment:
Per the [https://docs.djangoproject.com/en/dev/topics/db/multi-db/#cross-
database-relations multiple databases documentation]:
Django doesn’t currently provide any support for foreign key or many-to-
many relationships spanning multiple databases. If you have used a router
to partition models to different databases, any foreign key and many-to-
many relationships defined by those models must be internal to a single
database.
... if you’re using SQLite or MySQL with MyISAM tables, there is no
enforced referential integrity; as a result, you may be able to ‘fake’
cross database foreign keys. However, this configuration is not officially
supported by Django.
--
Ticket URL: <https://code.djangoproject.com/ticket/25811#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.21c02e3e60347fd288ecf9b4a4c6c298%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.