#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
-------------------------------------+-------------------------------------
Comment (by ebar0n):
You're right actually Django does not currently provide this support, but
both models are not directly related, plus I have a properly configured
router according to specifications.
I show you some models:
{{{
class Deportes(models.Model):
...
class DimensionJuegos(models.Model):
...
deporte_id = models.IntegerField()
...
}}}
Django so no support for relationships between different database, the ORM
should be able to identify subqueries that are different databases and
evaluate them before processing the first query, which is a optimization
generate internal inquiry but as subquery in this case it is not the right
way, that only works when the models are in the same database.
Perhaps lazy functionality Django queries that are evaluated only when
needed, but to build it must be verified in the generated subqueries.
By the way sorry for my bad English,
Regards.
--
Ticket URL: <https://code.djangoproject.com/ticket/25811#comment:2>
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.4379bbf9dc164c812f44fd8c5c256e5a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.